62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import { Geist, Geist_Mono } from 'next/font/google';
|
|
import './globals.css';
|
|
import Navbar from '@/components/ui/Navbar';
|
|
import Sidebar from '@/components/ui/Sidebar';
|
|
import { ThemeProvider } from '@/components/theme-provider';
|
|
import { Toaster } from '@/components/ui/toaster';
|
|
|
|
const geistSans = Geist({
|
|
variable: '--font-geist-sans',
|
|
subsets: ['latin'],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: '--font-geist-mono',
|
|
subsets: ['latin'],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Portal Data Informatika',
|
|
description: 'Admin Dashboard',
|
|
};
|
|
|
|
function ClientLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="system"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<div className="relative flex min-h-screen flex-col">
|
|
<Navbar />
|
|
<div className="flex flex-1">
|
|
<Sidebar />
|
|
<main className="flex-1 md:ml-[250px] p-2">
|
|
{children}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
<Toaster />
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
<link rel="icon" type="image/png" href="/podif-icon.png" />
|
|
</head>
|
|
<body suppressHydrationWarning className={`${geistSans.variable} ${geistMono.variable} antialiased min-h-screen`}>
|
|
<ClientLayout>{children}</ClientLayout>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|