Spaces:
Sleeping
Sleeping
Download frontend/src/components/layout/MainLayout.tsx from JacellJamble/genesis: direct link, hf CLI and curl.
- Browser
- Download file 685 Bytes
-
https://huggingface.co/spaces/JacellJamble/genesis/resolve/main/frontend/src/components/layout/MainLayout.tsx
- Command line
-
hf download hf://spaces/JacellJamble/genesis/frontend/src/components/layout/MainLayout.tsx
-
curl -L -o MainLayout.tsx https://huggingface.co/spaces/JacellJamble/genesis/resolve/main/frontend/src/components/layout/MainLayout.tsx
685 Bytes
| "use client"; | |
| import React, { ReactNode } from "react"; | |
| import { TopBar } from "./TopBar"; | |
| import { Sidebar } from "./Sidebar"; | |
| import { EpisodeGuard } from "../session/EpisodeGuard"; | |
| interface MainLayoutProps { | |
| children: ReactNode; | |
| requireEpisode?: boolean; | |
| } | |
| export const MainLayout = ({ children, requireEpisode = true }: MainLayoutProps) => { | |
| const content = ( | |
| <div className="flex min-h-screen"> | |
| <TopBar /> | |
| <Sidebar /> | |
| <main className="flex-1 lg:ml-64 pt-20 p-6 min-h-screen overflow-y-auto"> | |
| {children} | |
| </main> | |
| </div> | |
| ); | |
| if (!requireEpisode) return content; | |
| return <EpisodeGuard>{content}</EpisodeGuard>; | |
| }; | |