mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
37 lines
931 B
TypeScript
37 lines
931 B
TypeScript
import { cookies } from "next/headers"
|
|
|
|
import {
|
|
SidebarInset,
|
|
SidebarProvider,
|
|
} from "@/registry/new-york-v4/ui/sidebar"
|
|
import { AppSidebar } from "@/app/(examples)/dashboard/components/app-sidebar"
|
|
import { SiteHeader } from "@/app/(examples)/dashboard/components/site-header"
|
|
|
|
import "@/app/(examples)/dashboard/theme.css"
|
|
|
|
export default async function DashboardLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
const cookieStore = await cookies()
|
|
const defaultOpen = cookieStore.get("sidebar_state")?.value === "true"
|
|
|
|
return (
|
|
<SidebarProvider
|
|
defaultOpen={defaultOpen}
|
|
style={
|
|
{
|
|
"--sidebar-width": "calc(var(--spacing) * 72)",
|
|
} as React.CSSProperties
|
|
}
|
|
>
|
|
<AppSidebar variant="inset" />
|
|
<SidebarInset>
|
|
<SiteHeader />
|
|
<div className="flex flex-1 flex-col">{children}</div>
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
)
|
|
}
|