From 3a0f9c6e4850dea3654b07ca7310069322862b93 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Sat, 8 Jul 2023 12:51:03 +0200 Subject: [PATCH] Temporarily enable dark theme --- geneit_app/src/App.tsx | 71 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/geneit_app/src/App.tsx b/geneit_app/src/App.tsx index 6e3d5e6..c52a00c 100644 --- a/geneit_app/src/App.tsx +++ b/geneit_app/src/App.tsx @@ -1,7 +1,10 @@ +import { ThemeProvider, createTheme } from "@mui/material/styles"; import React from "react"; import { Route, Routes } from "react-router-dom"; import "./App.css"; import { AuthApi } from "./api/AuthApi"; +import { DeleteAccountRoute } from "./routes/DeleteAccountRoute"; +import { FamiliesListRoute } from "./routes/FamiliesListRoute"; import { NotFoundRoute } from "./routes/NotFound"; import { ProfileRoute } from "./routes/ProfileRoute"; import { LoginRoute } from "./routes/auth/LoginRoute"; @@ -9,12 +12,10 @@ import { NewAccountRoute } from "./routes/auth/NewAccountRoute"; import { OIDCCbRoute } from "./routes/auth/OIDCCbRoute"; import { PasswordForgottenRoute } from "./routes/auth/PasswordForgottenRoute"; import { ResetPasswordRoute } from "./routes/auth/ResetPasswordRoute"; -import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage"; -import { BaseLoginPage } from "./widgets/BaseLoginpage"; -import { DeleteAccountRoute } from "./routes/DeleteAccountRoute"; -import { FamiliesListRoute } from "./routes/FamiliesListRoute"; -import { BaseFamilyRoute } from "./widgets/BaseFamilyRoute"; import { FamilyHomeRoute } from "./routes/family/FamilyHomeRoute"; +import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage"; +import { BaseFamilyRoute } from "./widgets/BaseFamilyRoute"; +import { BaseLoginPage } from "./widgets/BaseLoginpage"; interface AuthContext { signedIn: boolean; @@ -23,6 +24,12 @@ interface AuthContext { const AuthContextK = React.createContext(null); +const darkTheme = createTheme({ + palette: { + mode: "dark", // TODO : switch back to light + }, +}); + /** * Core app */ @@ -35,35 +42,37 @@ export function App(): React.ReactElement { }; return ( - - - } /> + + + + } /> - {signedIn ? ( - }> - } /> - } /> - }> - } /> + {signedIn ? ( + }> + } /> + } /> + }> + } /> + } /> + } /> - } /> - - ) : ( - }> - } /> - } /> - } /> - } - /> - } /> - } /> - - )} - - + ) : ( + }> + } /> + } /> + } /> + } + /> + } /> + } /> + + )} + + + ); }