diff --git a/client/src/Components/layout/RootLayout.tsx b/client/src/Components/layout/RootLayout.tsx index c22bd7455..3312fc653 100644 --- a/client/src/Components/layout/RootLayout.tsx +++ b/client/src/Components/layout/RootLayout.tsx @@ -18,15 +18,13 @@ const RootLayout = () => { flex={1} padding={6} overflow={"hidden"} - sx={{ - backgroundColor: - theme.palette.mode === "dark" - ? "rgba(255, 255, 255, 0.01)" - : "rgba(0, 0, 0, 0.01)", - display: "flex", - alignItems: "center", - paddingLeft: isSmall ? `${collapsedWidth + 12}px` : 12, - }} + bgcolor={ + theme.palette.mode === "dark" + ? "rgba(255, 255, 255, 0.01)" + : "rgba(124, 116, 116, 0.01)" + } + alignItems="center" + paddingLeft={isSmall ? `${collapsedWidth + 12}px` : 12} > { const { t } = useTranslation(); const theme = useTheme(); + const mode = useSelector((state: RootState) => state.ui.mode); const user = useSelector((state: RootState) => state.auth.user); const navigate = useNavigate(); const dispatch = useDispatch(); @@ -105,13 +107,14 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) => {user?.firstName} {user?.lastName} {getRoleText()} @@ -154,15 +157,12 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) => pb={2} sx={{ pointerEvents: "none" }} > - + {user?.firstName} {user?.lastName} {getRoleText()} @@ -178,6 +178,18 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) => {item.name} ))} + { + dispatch(setMode(mode === "light" ? "dark" : "light")); + handleMenuClose(); + }} + sx={menuItemSx} + > + + {mode === "light" + ? t("pages.settings.form.ui.option.theme.dark") + : t("pages.settings.form.ui.option.theme.light")} + { })} +