diff --git a/src/app/AuthHTTPWrapper.tsx b/src/app/AuthHTTPWrapper.tsx
index b1dfdbb..834b7b7 100644
--- a/src/app/AuthHTTPWrapper.tsx
+++ b/src/app/AuthHTTPWrapper.tsx
@@ -11,7 +11,7 @@ import { getThemeType, setThemeType } from '../theme/themeType'
function AuthHTTPWrapper() {
const [token, setToken] = useState(undefined)
- const [palette, setPalette] = useState(CreateTheme("dark"));
+ const [palette, setPalette] = useState(CreateTheme(getThemeType()));
let url: string | undefined = import.meta.env.VITE_AUTH0_CLIENT_DOMAIN;
let audience: string | undefined = import.meta.env.VITE_AUTH0_AUDIENCE;
diff --git a/src/app/UserWrapper.tsx b/src/app/UserWrapper.tsx
index 8648962..f46b066 100644
--- a/src/app/UserWrapper.tsx
+++ b/src/app/UserWrapper.tsx
@@ -74,8 +74,6 @@ export default function UserWrapper(props: Props) {
loadUser()
}, [loading])
- console.log(loading)
- console.log(global)
if (loading || !global) return (
)
@@ -104,6 +102,5 @@ export default function UserWrapper(props: Props) {
-
)
}
\ No newline at end of file
diff --git a/src/common/ThemeIcon.tsx b/src/common/ThemeIcon.tsx
index 9b82230..dd15fc5 100644
--- a/src/common/ThemeIcon.tsx
+++ b/src/common/ThemeIcon.tsx
@@ -6,9 +6,9 @@ import { makeStyles } from "@mui/styles";
const useStyles = makeStyles(() => ({
darkThemeIcon: {
- borderRadius: "50%",
- padding: "1px",
- backgroundColor: "#003366",
+ // borderRadius: "50%",
+ // padding: "1px",
+ // backgroundColor: "#003366",
color: "#fefcd7 !important"
},
lightThemeIcon: {
@@ -30,13 +30,13 @@ export default function ThemeIcon() {
if (theme.palette.mode === "light") {
return (
-
+
{darkThemeIcon()}
);
} else {
return (
-
+
{lightThemeIcon()}
);
diff --git a/src/theme/theme.ts b/src/theme/theme.ts
index d4f5b99..34a6dc7 100644
--- a/src/theme/theme.ts
+++ b/src/theme/theme.ts
@@ -20,7 +20,7 @@ function options(themeType: "light" | "dark"): ThemeOptions {
primary: Colours[getPrimaryColour() as keyof typeof Colours],
secondary: Colours[getSecondaryColour() as keyof typeof Colours],
background: Colours.grey,
- type: themeType,
+ mode: themeType,
bxt: {
primaryBlue: "#005bb0",
lightBlue: "#1a86ec",
diff --git a/src/user/UserMenu.tsx b/src/user/UserMenu.tsx
index 375a502..2d34a67 100644
--- a/src/user/UserMenu.tsx
+++ b/src/user/UserMenu.tsx
@@ -7,6 +7,7 @@ import { useEffect, useState } from "react";
import UserTeamName from "./UserTeamName";
import React from "react";
import ThemeIcon from "../common/ThemeIcon";
+import { useAuth0 } from "@auth0/auth0-react";
const useStyles = makeStyles((theme: Theme) => ({
userAvatar: {
@@ -49,6 +50,7 @@ export default function UserMenu(props: Props) {
const { toggleTheme } = props;
const [{ user, team }] = useGlobalState();
+ const { loginWithRedirect } = useAuth0();
const classes = useStyles();
const theme = useTheme();
@@ -67,6 +69,10 @@ export default function UserMenu(props: Props) {
setLockIsHovered(false);
};
+ const handleLogin = () => {
+ loginWithRedirect()
+ }
+
useEffect(() => {
console.log(theme.palette.mode)
}, [theme.palette.mode])
@@ -81,7 +87,7 @@ export default function UserMenu(props: Props) {
+
+
+
+ >
+ )
}
\ No newline at end of file