Reverted all changes back to version 92d31b0051

This commit is contained in:
[dyad]
2026-01-18 14:14:05 +01:00
parent 81680e7e63
commit eb7e8cb60d
18 changed files with 262 additions and 1045 deletions

View File

@@ -1,66 +0,0 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "../globals.css";
import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@/components/ui/sonner";
import { Footer } from "@/components/footer";
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
type Props = {
params: { locale: string };
};
export async function generateMetadata({
params: { locale },
}: Props): Promise<Metadata> {
// Using a dynamic import for messages to avoid bundling all of them
const messages = (await import(`../../../messages/${locale}.json`)).default;
const t = (key: string) => messages.Metadata[key as keyof typeof messages.Metadata] || key;
return {
title: t("title"),
description: t("description"),
};
}
export default async function RootLayout({
children,
params: { locale },
}: Readonly<{
children: React.ReactNode;
params: { locale: string };
}>) {
const messages = await getMessages();
return (
<html lang={locale} suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<NextIntlClientProvider messages={messages}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<Footer />
<Toaster />
</ThemeProvider>
</NextIntlClientProvider>
</body>
</html>
);
}