Download src/components/layout/AppShell.tsx from sarransh/task-manager-system: direct link, hf CLI and curl.
- Browser
- Download file 890 Bytes
-
https://huggingface.co/spaces/sarransh/task-manager-system/resolve/main/src/components/layout/AppShell.tsx
- Command line
-
hf download hf://spaces/sarransh/task-manager-system/src/components/layout/AppShell.tsx
-
curl -L -o AppShell.tsx https://huggingface.co/spaces/sarransh/task-manager-system/resolve/main/src/components/layout/AppShell.tsx
890 Bytes
| "use client"; | |
| import { useSession } from "next-auth/react"; | |
| import Sidebar from "./Sidebar"; | |
| import { usePathname } from "next/navigation"; | |
| export default function AppShell({ children }: { children: React.ReactNode }) { | |
| const { status } = useSession(); | |
| const pathname = usePathname(); | |
| // Don't show shell on auth pages | |
| if (pathname.startsWith("/auth") || status === "unauthenticated") { | |
| return <main className="min-h-screen bg-[hsl(var(--background))]">{children}</main>; | |
| } | |
| return ( | |
| <div className="flex min-h-screen bg-[hsl(var(--background))]"> | |
| <Sidebar /> | |
| <main className="flex-1 ml-64 p-8 overflow-y-auto h-screen"> | |
| <div className="max-w-7xl mx-auto space-y-8 animate-fade-in"> | |
| {children} | |
| </div> | |
| </main> | |
| </div> | |
| ); | |
| } | |