This commit is contained in:
ct
2025-07-15 03:11:43 +08:00
parent 31383349c2
commit eb207b98d9
8 changed files with 7 additions and 34 deletions

View File

@@ -8,11 +8,11 @@ interface AppShellProps {
}
export function AppShell({ children, variant = 'header' }: AppShellProps) {
const isOpen = usePage<SharedData>().props.sidebarOpen;
const defaultSidebarOpen = true;
if (variant === 'header') {
return <div className="flex min-h-screen w-full flex-col">{children}</div>;
}
return <SidebarProvider defaultOpen={isOpen}>{children}</SidebarProvider>;
return <SidebarProvider defaultOpen={defaultSidebarOpen}>{children}</SidebarProvider>;
}