Spaces:
Sleeping
Sleeping
Download befree-frontend/components/layout/AppLayout.tsx from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 999 Bytes
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/befree-frontend/components/layout/AppLayout.tsx
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/befree-frontend/components/layout/AppLayout.tsx
-
curl -L -o AppLayout.tsx https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/befree-frontend/components/layout/AppLayout.tsx
999 Bytes
| 'use client'; | |
| import { Sidebar } from './Sidebar'; | |
| import { Header } from './Header'; | |
| import { useBeFreeStore } from '@/store/befree-store'; | |
| interface AppLayoutProps { | |
| children: React.ReactNode; | |
| } | |
| export function AppLayout({ children }: AppLayoutProps) { | |
| // Read state from global store to calculate dynamic margins | |
| const isSidebarOpen = useBeFreeStore((state) => state.isSidebarOpen); | |
| return ( | |
| <div className="h-screen bg-background overflow-hidden"> | |
| <Sidebar /> | |
| <div | |
| // Transition added to slide content smoothly with the sidebar animation | |
| className="flex flex-col h-screen transition-all duration-250 ease-in-out" | |
| style={{ marginLeft: isSidebarOpen ? '260px' : '72px' }} | |
| > | |
| <Header /> | |
| <main | |
| className="flex-1 overflow-y-auto" | |
| style={{ marginTop: '64px' }} | |
| > | |
| <div className="w-full h-full">{children}</div> | |
| </main> | |
| </div> | |
| </div> | |
| ); | |
| } |