37 lines
829 B
TypeScript
37 lines
829 B
TypeScript
import { Geist, Geist_Mono } from "next/font/google";
|
|
import { NextAuthSessionProvider } from "./_components/AuthSessionProvider";
|
|
import { getServerSession } from "./api/auth/[...nextauth]/auth";
|
|
import "./globals.css";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const RootLayout = async ({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) => {
|
|
const session = await getServerSession();
|
|
|
|
return (
|
|
<html lang="en">
|
|
<NextAuthSessionProvider session={session}>
|
|
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
|
{children}
|
|
</body>
|
|
</NextAuthSessionProvider>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
RootLayout.displayName = "RootLayout";
|
|
|
|
export default RootLayout;
|