-
-
Notifications
You must be signed in to change notification settings - Fork 334
Expand file tree
/
Copy pathlayout.tsx
More file actions
60 lines (57 loc) · 1.61 KB
/
layout.tsx
File metadata and controls
60 lines (57 loc) · 1.61 KB
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
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import "katex/dist/katex.min.css";
import {
ThemeProvider,
ThemeStyleProvider,
} from "@/components/layouts/theme-provider";
import { Toaster } from "ui/sonner";
import { NextIntlClientProvider } from "next-intl";
import { getLocale } from "next-intl/server";
import { FileStorageInitializer } from "@/components/file-storage-initializer";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "better-chatbot",
description:
"Better Chatbot is a chatbot that uses the Tools to answer questions.",
};
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const locale = await getLocale();
return (
<html lang={locale} suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
themes={["light", "dark"]}
storageKey="app-theme-v2"
disableTransitionOnChange
>
<ThemeStyleProvider>
<NextIntlClientProvider>
<FileStorageInitializer />
<div id="root">
{children}
<Toaster richColors />
</div>
</NextIntlClientProvider>
</ThemeStyleProvider>
</ThemeProvider>
</body>
</html>
);
}