-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
63 lines (56 loc) · 1.77 KB
/
layout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type { Metadata } from "next";
import localFont from "next/font/local";
import { SessionProvider } from "next-auth/react";
import { ReactNode } from "react";
import "./globals.css";
import { auth } from "@/auth";
import { Toaster } from "@/components/ui/toaster";
import ThemeProvider from "@/context/Theme";
const inter = localFont({
src: "./fonts/InterVF.ttf",
variable: "--font-inter",
weight: "100 200 300 400 500 600 700 800 900",
});
const spaceGrotesk = localFont({
src: "./fonts/SpaceGroteskVF.ttf",
variable: "--font-space-grotesk",
weight: "300 400 500 600 700",
});
export const metadata: Metadata = {
title: "Dev Overflow",
description:
"A community-driven platform for asking and answering programming questions. Get help, share knowledge, and collaborate with developers from around the world. Explore topics in web development, mobile app development, algorithms, data structures, and more.",
icons: {
icon: "/images/site-logo.svg",
},
};
const RootLayout = async ({ children }: { children: ReactNode }) => {
const session = await auth();
return (
<html lang="en" suppressHydrationWarning>
<head>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css"
/>
</head>
<SessionProvider session={session}>
<body
className={`${inter.className} ${spaceGrotesk.variable} antialiased`}
>
<Toaster />
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
</body>
</SessionProvider>
</html>
);
};
export default RootLayout;