refactor: extract dashboard layout under /(dashboard)
parent
74f81cb02a
commit
62b10f3723
|
|
@ -1,5 +1,6 @@
|
|||
import { Metadata } from 'next'
|
||||
import Sidebar from './components/sidebar'
|
||||
import { Header } from '@/components/header'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Dashboard'
|
||||
|
|
@ -10,5 +11,10 @@ interface DashboardLayoutProps {
|
|||
}
|
||||
|
||||
export default function RootLayout({ children }: DashboardLayoutProps) {
|
||||
return <Sidebar className="flex-1">{children}</Sidebar>
|
||||
return <>
|
||||
<Header />
|
||||
<main className="bg-muted/50 flex flex-1 flex-col">
|
||||
<Sidebar className="flex-1">{children}</Sidebar>
|
||||
</main>
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
|||
<Toaster />
|
||||
<Providers attribute="class" defaultTheme="system" enableSystem>
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<Header />
|
||||
<main className="bg-muted/50 flex flex-1 flex-col">{children}</main>
|
||||
{children}
|
||||
</div>
|
||||
<TailwindIndicator />
|
||||
</Providers>
|
||||
|
|
|
|||
Loading…
Reference in New Issue