Spaces:
Sleeping
Sleeping
Download frontend/src/components/layout/AppLayout.tsx from fabioantonini/grapholab: direct link, hf CLI and curl.
- Browser
- Download file 458 Bytes
-
https://huggingface.co/spaces/fabioantonini/grapholab/resolve/main/frontend/src/components/layout/AppLayout.tsx
- Command line
-
hf download hf://spaces/fabioantonini/grapholab/frontend/src/components/layout/AppLayout.tsx
-
curl -L -o AppLayout.tsx https://huggingface.co/spaces/fabioantonini/grapholab/resolve/main/frontend/src/components/layout/AppLayout.tsx
458 Bytes
| import { Navigate, Outlet } from "react-router-dom" | |
| import { useAuthStore } from "@/store/auth" | |
| import Sidebar from "./Sidebar" | |
| export default function AppLayout() { | |
| const { isAuthenticated } = useAuthStore() | |
| if (!isAuthenticated()) return <Navigate to="/login" replace /> | |
| return ( | |
| <div className="flex min-h-screen"> | |
| <Sidebar /> | |
| <main className="flex-1 overflow-auto bg-background"> | |
| <Outlet /> | |
| </main> | |
| </div> | |
| ) | |
| } | |