diff --git a/src/main.jsx b/src/main.jsx index 5361ee3..d367e92 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -10,6 +10,7 @@ import { import { Box, CssBaseline, + CircularProgress, Toolbar } from "@mui/material"; import Home from './Home'; @@ -81,8 +82,17 @@ const routerMapping = [ /** Reads authConfig from AppProvider context and passes it to AuthProvider. */ function AppContent() { - const { authConfig } = useAppContext(); + const { authConfig, loading } = useAppContext(); const navigate = useNavigate(); + + if (loading) { + return ( + + + + ); + } + return ( navigate("/login")}>