-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
84 lines (74 loc) · 2.29 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { Analytics } from "@vercel/analytics/react";
import { GoogleAnalytics } from "@next/third-parties/google";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { RootProvider } from "fumadocs-ui/provider";
import { NuqsAdapter } from "nuqs/adapters/next";
import localFont from "next/font/local";
import { I18nProvider } from "fumadocs-ui/i18n";
import Footer from "@/components/footer";
import { ThemeProvider } from "@/components/theme-provider";
import { I18nProviderClient } from "@/locales/client";
import NewMetadata from "@/lib/metadata";
import { cn } from "@/lib/utils";
import "./global.css";
export const metadata = NewMetadata({
title: "minpeter",
description: "이 웹에서 가장 멋진 사이트가 될거야~",
});
const FontSans = localFont({
variable: "--font-sans",
display: "swap",
src: [
{
path: "../../public/fonts/AritaBuri-Medium.woff2",
weight: "400",
style: "normal",
},
],
});
import { getStaticParams } from "@/locales/server";
export function generateStaticParams() {
return getStaticParams();
}
export default async function RootLayout({
params,
children,
}: {
params: Promise<{ locale: string }>;
children: React.ReactNode;
}) {
const { locale } = await params;
return (
<html
lang={locale ? locale : "ko"}
className={cn("antialiased", FontSans.className)}
suppressHydrationWarning
>
<body>
<I18nProviderClient locale={locale}>
<I18nProvider locale={locale}>
<ThemeProvider
attribute="class"
defaultTheme="dark"
enableSystem
disableTransitionOnChange
>
<RootProvider>
<NuqsAdapter>
<main className="relative mx-auto min-h-screen w-full max-w-3xl px-4 py-24">
<div className="from-background pointer-events-none fixed inset-x-0 top-0 z-10 h-24 bg-linear-to-b to-transparent" />
{children}
</main>
<Footer />
</NuqsAdapter>
</RootProvider>
</ThemeProvider>
</I18nProvider>
</I18nProviderClient>
</body>
<Analytics />
<SpeedInsights />
<GoogleAnalytics gaId="G-8L34G6HSJS" />
</html>
);
}