feat(admin): bearer auth with admin-only gate + login screen

This commit is contained in:
Bas van Rossem
2026-06-17 18:59:43 +02:00
parent 682a9dce44
commit 77659edf8e
5 changed files with 233 additions and 1 deletions

View File

@@ -1,3 +1,20 @@
export default function App() {
import { AuthProvider, useAuth } from './auth/AuthContext';
import Login from './screens/Login';
function AuthedShell() {
// Placeholder shell — replaced by the sidebar + routing in Task 4.
return <div>SoleLog Admin</div>;
}
function Gate() {
const { isAuthed } = useAuth();
return isAuthed ? <AuthedShell /> : <Login />;
}
export default function App() {
return (
<AuthProvider>
<Gate />
</AuthProvider>
);
}