feat(admin): bearer auth with admin-only gate + login screen
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user