Refactor
This commit is contained in:
23
src/app/(admin)/admin/layout.tsx
Normal file
23
src/app/(admin)/admin/layout.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { SidebarProvider } from "@/components/ui/sidebar"
|
||||
import { ReactNode } from "react"
|
||||
import { DashboardSidebar } from "./_components/sidebar"
|
||||
import { SidebarClient } from "./_components/sidebar-client"
|
||||
|
||||
export default function DashboardLayout({
|
||||
children
|
||||
}: {
|
||||
children: ReactNode
|
||||
}) {
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<SidebarClient>
|
||||
<div className="flex w-full min-h-screen">
|
||||
<DashboardSidebar />
|
||||
<main className="overflow-auto flex-1 p-6">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
</SidebarClient>
|
||||
</SidebarProvider>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user