Build and Deploy / test-backend (push) Successful in 1m11s
Build and Deploy / lint-frontend (push) Successful in 21s
Build and Deploy / build-backend (push) Successful in 58s
Build and Deploy / deploy (push) Canceled after 0s
Build and Deploy / build-frontend (push) Canceled after 5m38s
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Inter } from "next/font/google";
|
|
import { cookies } from "next/headers";
|
|
import "./globals.css";
|
|
import { cn } from "@/lib/utils";
|
|
import { NextIntlClientProvider } from "next-intl";
|
|
import { ThemeProvider } from "@/components/themeProvider";
|
|
import { LANGUAGE_CODES } from "@/types/api";
|
|
|
|
const inter = Inter({
|
|
weight: ["400", "500", "600"],
|
|
subsets: ["latin", "latin-ext", "cyrillic"],
|
|
variable: "--font-sans"
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Fancy",
|
|
};
|
|
|
|
export default async function RootLayout({ children }: LayoutProps<"/">) {
|
|
const requested = (await cookies()).get("locale")?.value ?? "";
|
|
const lang = LANGUAGE_CODES.includes(requested as (typeof LANGUAGE_CODES)[number])
|
|
? requested
|
|
: "en";
|
|
|
|
return (
|
|
<html
|
|
lang={lang}
|
|
className={cn("h-full", "antialiased", "font-sans", inter.variable)}
|
|
suppressHydrationWarning
|
|
>
|
|
<body className="min-h-full flex flex-col selection:bg-zinc-300/50 dark:selection:bg-blue-400/50">
|
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
<NextIntlClientProvider>{children}</NextIntlClientProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|