Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 3d66174

Browse files
Manuel Proßizzyyhh
authored andcommitted
feat(web): wrap app in session provider
1 parent 41ab34f commit 3d66174

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

web/src/app/layout.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Metadata } from "next";
33
import "../styles/globals.scss";
44
import qs from "qs";
55
import Layout from "@/components/Layout/Layout";
6+
import SessionProvider from "./../components/SessionProvider";
67

78
const params = {
89
nested: true,
@@ -40,10 +41,17 @@ async function getPageProps() {
4041

4142
export default async function RootLayout({ children }: { children: React.ReactNode }) {
4243
const pageProps = await getPageProps();
44+
const session = await getServerSession();
4345

4446
return (
4547
<html lang="en">
46-
<body className={firaCode.className}>{pageProps && <Layout pages={pageProps}>{children}</Layout>}</body>
48+
<body className={inter.className}>
49+
{pageProps && (
50+
<Layout pages={pageProps}>
51+
<SessionProvider session={session}>{children}</SessionProvider>
52+
</Layout>
53+
)}
54+
</body>
4755
</html>
4856
);
4957
}

0 commit comments

Comments
 (0)