38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import { GeistSans } from "geist/font/sans";
|
|
import { NextIntlClientProvider } from "next-intl";
|
|
import { getLocale, getTranslations } from "next-intl/server";
|
|
import "./globals.css";
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
const t = await getTranslations("app");
|
|
return {
|
|
title: t("name"),
|
|
description: t("tagline"),
|
|
applicationName: t("name"),
|
|
appleWebApp: { capable: true, title: t("name"), statusBarStyle: "default" },
|
|
icons: { icon: "/icon.svg", apple: "/apple-touch-icon.png" },
|
|
};
|
|
}
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
viewportFit: "cover",
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#faf6ee" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#221d19" },
|
|
],
|
|
};
|
|
|
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
const locale = await getLocale();
|
|
return (
|
|
<html lang={locale} className={GeistSans.variable}>
|
|
<body className="min-h-dvh antialiased">
|
|
<NextIntlClientProvider>{children}</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|