Spaces:
Runtime error
Runtime error
| 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"; | |
| 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> | |
| <div id="root"> | |
| {children} | |
| <Toaster richColors /> | |
| </div> | |
| </NextIntlClientProvider> | |
| </ThemeStyleProvider> | |
| </ThemeProvider> | |
| </body> | |
| </html> | |
| ); | |
| } | |