Files

49 lines
1.2 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { cookies } from "next/headers";
import { getLocale, LOCALE_COOKIE } from "@/lib/i18n";
import PwaRegister from "@/app/pwa-register";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "ADC BestelApp",
description: "Bekijk artikelen uit SAP Business One.",
applicationName: "ADC BestelApp",
manifest: "/manifest.webmanifest",
appleWebApp: {
capable: true,
title: "ADC BestelApp",
statusBarStyle: "default",
},
icons: {
icon: "/icon.svg",
apple: "/icon.svg",
},
};
export default async function RootLayout({ children }: LayoutProps<"/">) {
const locale = getLocale((await cookies()).get(LOCALE_COOKIE)?.value);
return (
<html
lang={locale === "yue" ? "yue" : locale}
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">
<PwaRegister />
{children}
</body>
</html>
);
}