diff --git a/src/sections/engineSettings/engineSettingsDialog.tsx b/src/sections/engineSettings/engineSettingsDialog.tsx
index 4cf19fb..c409eac 100644
--- a/src/sections/engineSettings/engineSettingsDialog.tsx
+++ b/src/sections/engineSettings/engineSettingsDialog.tsx
@@ -183,7 +183,7 @@ export default function EngineSettingsDialog({ open, onClose }: Props) {
diff --git a/src/sections/layout/NavBar.tsx b/src/sections/layout/NavBar.tsx
index fe7833d..aacd638 100644
--- a/src/sections/layout/NavBar.tsx
+++ b/src/sections/layout/NavBar.tsx
@@ -27,7 +27,11 @@ export default function NavBar({ darkMode, switchDarkMode }: Props) {
theme.zIndex.drawer + 1 }}
+ sx={{
+ zIndex: (theme) => theme.zIndex.drawer + 1,
+ backgroundColor: darkMode ? "#19191c" : "white",
+ color: darkMode ? "white" : "black",
+ }}
enableColorOnDark
>
diff --git a/src/sections/layout/index.tsx b/src/sections/layout/index.tsx
index c9b700a..87d5c2a 100644
--- a/src/sections/layout/index.tsx
+++ b/src/sections/layout/index.tsx
@@ -5,13 +5,13 @@ import { red } from "@mui/material/colors";
import { useLocalStorage } from "@/hooks/useLocalStorage";
export default function Layout({ children }: PropsWithChildren) {
- const [useDarkMode, setDarkMode] = useLocalStorage("useDarkMode", true);
+ const [isDarkMode, setDarkMode] = useLocalStorage("useDarkMode", true);
const theme = useMemo(
() =>
createTheme({
palette: {
- mode: useDarkMode ? "dark" : "light",
+ mode: isDarkMode ? "dark" : "light",
error: {
main: red[400],
},
@@ -19,20 +19,20 @@ export default function Layout({ children }: PropsWithChildren) {
main: "#5d9948",
},
secondary: {
- main: useDarkMode ? "#424242" : "#ffffff",
+ main: isDarkMode ? "#424242" : "#ffffff",
},
},
}),
- [useDarkMode]
+ [isDarkMode]
);
- if (useDarkMode === null) return null;
+ if (isDarkMode === null) return null;
return (
setDarkMode((val) => !val)}
/>
{children}