41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import "./globals.css";
|
|
import type { Metadata } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
|
import { AppSidebar } from "@/components/sidebar/app-sidebar";
|
|
import { SiteHeader } from "@/components/sidebar/site-header";
|
|
import Providers from "./providers";
|
|
|
|
const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"] });
|
|
|
|
const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"] });
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Create Next App",
|
|
description: "Generated by create next app",
|
|
};
|
|
|
|
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
|
return (
|
|
<html lang="en">
|
|
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
|
<Providers>
|
|
<SidebarProvider style={{ "--sidebar-width": "calc(var(--spacing) * 72)", "--header-height": "calc(var(--spacing) * 12)" } as React.CSSProperties}>
|
|
<AppSidebar variant="inset" />
|
|
<SidebarInset>
|
|
<SiteHeader />
|
|
<div className="flex flex-1 flex-col">
|
|
<div className="@container/main flex flex-1 flex-col gap-2">
|
|
<div className="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
</Providers>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|