Temporarily enable dark theme
This commit is contained in:
		@@ -1,7 +1,10 @@
 | 
				
			|||||||
 | 
					import { ThemeProvider, createTheme } from "@mui/material/styles";
 | 
				
			||||||
import React from "react";
 | 
					import React from "react";
 | 
				
			||||||
import { Route, Routes } from "react-router-dom";
 | 
					import { Route, Routes } from "react-router-dom";
 | 
				
			||||||
import "./App.css";
 | 
					import "./App.css";
 | 
				
			||||||
import { AuthApi } from "./api/AuthApi";
 | 
					import { AuthApi } from "./api/AuthApi";
 | 
				
			||||||
 | 
					import { DeleteAccountRoute } from "./routes/DeleteAccountRoute";
 | 
				
			||||||
 | 
					import { FamiliesListRoute } from "./routes/FamiliesListRoute";
 | 
				
			||||||
import { NotFoundRoute } from "./routes/NotFound";
 | 
					import { NotFoundRoute } from "./routes/NotFound";
 | 
				
			||||||
import { ProfileRoute } from "./routes/ProfileRoute";
 | 
					import { ProfileRoute } from "./routes/ProfileRoute";
 | 
				
			||||||
import { LoginRoute } from "./routes/auth/LoginRoute";
 | 
					import { LoginRoute } from "./routes/auth/LoginRoute";
 | 
				
			||||||
@@ -9,12 +12,10 @@ import { NewAccountRoute } from "./routes/auth/NewAccountRoute";
 | 
				
			|||||||
import { OIDCCbRoute } from "./routes/auth/OIDCCbRoute";
 | 
					import { OIDCCbRoute } from "./routes/auth/OIDCCbRoute";
 | 
				
			||||||
import { PasswordForgottenRoute } from "./routes/auth/PasswordForgottenRoute";
 | 
					import { PasswordForgottenRoute } from "./routes/auth/PasswordForgottenRoute";
 | 
				
			||||||
import { ResetPasswordRoute } from "./routes/auth/ResetPasswordRoute";
 | 
					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 { FamilyHomeRoute } from "./routes/family/FamilyHomeRoute";
 | 
				
			||||||
 | 
					import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage";
 | 
				
			||||||
 | 
					import { BaseFamilyRoute } from "./widgets/BaseFamilyRoute";
 | 
				
			||||||
 | 
					import { BaseLoginPage } from "./widgets/BaseLoginpage";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface AuthContext {
 | 
					interface AuthContext {
 | 
				
			||||||
  signedIn: boolean;
 | 
					  signedIn: boolean;
 | 
				
			||||||
@@ -23,6 +24,12 @@ interface AuthContext {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const AuthContextK = React.createContext<AuthContext | null>(null);
 | 
					const AuthContextK = React.createContext<AuthContext | null>(null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const darkTheme = createTheme({
 | 
				
			||||||
 | 
					  palette: {
 | 
				
			||||||
 | 
					    mode: "dark", // TODO : switch back to light
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Core app
 | 
					 * Core app
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -35,6 +42,7 @@ export function App(): React.ReactElement {
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
 | 
					    <ThemeProvider theme={darkTheme}>
 | 
				
			||||||
      <AuthContextK.Provider value={context}>
 | 
					      <AuthContextK.Provider value={context}>
 | 
				
			||||||
        <Routes>
 | 
					        <Routes>
 | 
				
			||||||
          <Route path="delete_account" element={<DeleteAccountRoute />} />
 | 
					          <Route path="delete_account" element={<DeleteAccountRoute />} />
 | 
				
			||||||
@@ -64,6 +72,7 @@ export function App(): React.ReactElement {
 | 
				
			|||||||
          )}
 | 
					          )}
 | 
				
			||||||
        </Routes>
 | 
					        </Routes>
 | 
				
			||||||
      </AuthContextK.Provider>
 | 
					      </AuthContextK.Provider>
 | 
				
			||||||
 | 
					    </ThemeProvider>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user