base con autenticacion, registro, modulo encuestas
This commit is contained in:
31
apps/web/app/dashboard/layout.tsx
Normal file
31
apps/web/app/dashboard/layout.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { AppSidebar } from '@/components/layout/app-sidebar';
|
||||
import Header from '@/components/layout/header';
|
||||
import { SidebarInset, SidebarProvider } from '@repo/shadcn/sidebar';
|
||||
import type { Metadata } from 'next';
|
||||
import { cookies } from 'next/headers';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Dashboard',
|
||||
description: 'Sistema integral para Cajas de Ahorro',
|
||||
};
|
||||
|
||||
export default async function DashboardLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// Persisting the sidebar state in the cookie.
|
||||
const cookieStore = await cookies();
|
||||
//const defaultOpen = cookieStore.get('sidebar:state')?.value === 'false';
|
||||
return (
|
||||
<SidebarProvider defaultOpen={true}>
|
||||
<AppSidebar />
|
||||
<SidebarInset>
|
||||
<Header />
|
||||
{/* page main content */}
|
||||
{children}
|
||||
{/* page main content ends */}
|
||||
</SidebarInset>
|
||||
</SidebarProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user