completed oauth implementation on hub and dispatch
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
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',
|
||||
@@ -16,17 +18,20 @@ export const metadata: Metadata = {
|
||||
description: 'Die neue VAR Leitstelle.',
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
const session = await getServerSession();
|
||||
return (
|
||||
<html lang="de" data-theme="light">
|
||||
<html lang="de" data-theme="dark">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-screen flex flex-col`}
|
||||
>
|
||||
{children}
|
||||
<NextAuthSessionProvider session={session}>
|
||||
{children}
|
||||
</NextAuthSessionProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user