This commit is contained in:
seb
2026-06-23 11:04:28 +02:00
commit 24f68c94f3
16 changed files with 2580 additions and 0 deletions

27
src/App.jsx Normal file
View File

@@ -0,0 +1,27 @@
import Box from '@mui/material/Box';
import CircularProgress from '@mui/material/CircularProgress';
import { useAuth } from './auth/AuthContext';
import LoginPage from './components/LoginPage';
import AppShell from './components/AppShell';
// Top-level router by auth status. Kept tiny so it rarely re-renders.
export default function App() {
const { status } = useAuth();
if (status === 'loading') {
return (
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: '100vh',
}}
>
<CircularProgress />
</Box>
);
}
return status === 'authed' ? <AppShell /> : <LoginPage />;
}