28 lines
758 B
TypeScript
28 lines
758 B
TypeScript
import type { Metadata } from "next";
|
|
import { getLocale } from "next-intl/server";
|
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
import { getDirection } from "@/lib/locale";
|
|
import "./globals.css";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "moh-sass",
|
|
description: "Multilingual Next.js base project",
|
|
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL ?? "https://mohfarawati.de"),
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const locale = await getLocale().catch(() => "de");
|
|
|
|
return (
|
|
<html lang={locale} dir={getDirection(locale)} suppressHydrationWarning>
|
|
<body>
|
|
<ThemeProvider>{children}</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|