You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
867 B
TypeScript
32 lines
867 B
TypeScript
import { Suspense } from "react";
|
|
import {
|
|
SidebarInset,
|
|
SidebarProvider,
|
|
SidebarTrigger,
|
|
} from "@/components/ui/sidebar";
|
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
import { ThemeSwitch } from "@/components/theme-switch";
|
|
import { AppSidebar } from "./_components/app-sidebar";
|
|
import { SidebarUser } from "./_components/sidebar-user";
|
|
|
|
export default function DashboardLayout({ children }: LayoutProps<"/">) {
|
|
return (
|
|
<SidebarProvider>
|
|
<AppSidebar
|
|
footer={
|
|
<Suspense fallback={<Skeleton className="h-9 w-full" />}>
|
|
<SidebarUser />
|
|
<ThemeSwitch />
|
|
</Suspense>
|
|
}
|
|
/>
|
|
<SidebarInset>
|
|
<header className="flex h-12 items-center border-b px-4">
|
|
<SidebarTrigger />
|
|
</header>
|
|
{children}
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
);
|
|
}
|