|
1 | | -import { NextIntlClientProvider } from "next-intl"; |
2 | | -import { getLocale, getMessages, setRequestLocale } from "next-intl/server"; |
3 | | -import { Roboto } from "next/font/google"; |
4 | | -import { cn } from "@/lib/utils"; |
| 1 | +import { ReactNode } from "react"; |
5 | 2 | import "@/app/globals.css"; |
6 | | -import type { Metadata } from "next"; |
7 | | -import { ThemeProvider } from "@/components/theme-provider"; |
8 | | -import { type ReactNode } from "react"; |
9 | | -import { Toaster } from "@/components/ui/toaster"; |
10 | | -import { routing } from "@/i18n/routing"; |
11 | | -import { TooltipProvider } from "@/components/ui/tooltip"; |
12 | 3 |
|
13 | | -const roboto = Roboto({ subsets: ["latin"], weight: ["300", "400", "500", "700"], style: ["italic", "normal"] }); |
14 | | - |
15 | | -export const metadata: Metadata = { |
16 | | - title: "Starter Kit by @leho-dev", |
17 | | - description: "Generated by create next app" |
| 4 | +type Props = { |
| 5 | + children: ReactNode; |
18 | 6 | }; |
19 | 7 |
|
20 | | -export default async function LocaleLayout({ children }: { children: ReactNode }) { |
21 | | - const locale = await getLocale(); |
22 | | - setRequestLocale(locale); |
23 | | - |
24 | | - const messages = await getMessages(); |
25 | | - |
26 | | - return ( |
27 | | - <html lang={locale || routing.defaultLocale} suppressHydrationWarning> |
28 | | - <body className={cn(roboto.className, "w-screen h-screen flex flex-col")}> |
29 | | - <ThemeProvider attribute='class' defaultTheme='system' enableSystem disableTransitionOnChange> |
30 | | - <TooltipProvider> |
31 | | - <NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider> |
32 | | - </TooltipProvider> |
33 | | - <Toaster /> |
34 | | - </ThemeProvider> |
35 | | - </body> |
36 | | - </html> |
37 | | - ); |
| 8 | +// Since we have a `not-found.tsx` page on the root, a layout file |
| 9 | +// is required, even if it's just passing children through. |
| 10 | +export default function RootLayout({ children }: Props) { |
| 11 | + return children; |
38 | 12 | } |
0 commit comments