39 lines
1009 B
TypeScript
39 lines
1009 B
TypeScript
import type { Metadata } from 'next';
|
|
import localFont from 'next/font/local';
|
|
import './globals.css';
|
|
import { NextAuthSessionProvider } from './_components/AuthSessionProvider';
|
|
import { getServerSession } from './api/auth/[...nextauth]/auth';
|
|
|
|
const geistSans = localFont({
|
|
src: './fonts/GeistVF.woff',
|
|
variable: '--font-geist-sans',
|
|
});
|
|
const geistMono = localFont({
|
|
src: './fonts/GeistMonoVF.woff',
|
|
variable: '--font-geist-mono',
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'VAR Leitstelle v2',
|
|
description: 'Die neue VAR Leitstelle.',
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const session = await getServerSession();
|
|
return (
|
|
<html lang="de" data-theme="dark">
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} h-screen flex flex-col`}
|
|
>
|
|
<NextAuthSessionProvider session={session}>
|
|
{children}
|
|
</NextAuthSessionProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|