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.
30 lines
782 B
TypeScript
30 lines
782 B
TypeScript
import { Suspense } from "react";
|
|
import {
|
|
SidebarInset,
|
|
SidebarProvider,
|
|
SidebarTrigger,
|
|
} from "@/components/ui/sidebar";
|
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
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 />
|
|
</Suspense>
|
|
}
|
|
/>
|
|
<SidebarInset>
|
|
<header className="flex h-12 items-center border-b px-4">
|
|
<SidebarTrigger />
|
|
</header>
|
|
{children}
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
);
|
|
}
|