MCPcopy
hub / github.com/shadcn-ui/taxonomy / DashboardLayout

Function DashboardLayout

app/(dashboard)/dashboard/layout.tsx:14–48  ·  view source on GitHub ↗
({
  children,
}: DashboardLayoutProps)

Source from the content-addressed store, hash-verified

12}
13
14export default async function DashboardLayout({
15 children,
16}: DashboardLayoutProps) {
17 const user = await getCurrentUser()
18
19 if (!user) {
20 return notFound()
21 }
22
23 return (
24 <div className="flex min-h-screen flex-col space-y-6">
25 <header className="sticky top-0 z-40 border-b bg-background">
26 <div className="container flex h-16 items-center justify-between py-4">
27 <MainNav items={dashboardConfig.mainNav} />
28 <UserAccountNav
29 user={{
30 name: user.name,
31 image: user.image,
32 email: user.email,
33 }}
34 />
35 </div>
36 </header>
37 <div className="container grid flex-1 gap-12 md:grid-cols-[200px_1fr]">
38 <aside className="hidden w-[200px] flex-col md:flex">
39 <DashboardNav items={dashboardConfig.sidebarNav} />
40 </aside>
41 <main className="flex w-full flex-1 flex-col overflow-hidden">
42 {children}
43 </main>
44 </div>
45 <SiteFooter className="border-t" />
46 </div>
47 )
48}

Callers

nothing calls this directly

Calls 1

getCurrentUserFunction · 0.90

Tested by

no test coverage detected