import type { Metadata } from "next"; import { Cascadia_Mono } from "next/font/google"; import "./globals.css"; import { getDictionary } from "@/lib/i18n/get-dictionary"; import { getLocale } from "@/lib/i18n/get-locale"; import { SITE_URL } from "@/lib/site"; const cascadiaCode = Cascadia_Mono({ variable: "--font-cascadia", subsets: ["latin"], }); export async function generateMetadata(): Promise { const locale = await getLocale(); const dict = getDictionary(locale); return { metadataBase: new URL(SITE_URL), title: { default: dict.meta.title, template: "%s ยท fristy.dev", }, description: dict.meta.description, openGraph: { title: dict.meta.title, description: dict.meta.description, url: "/", type: "website", }, }; } export default async function RootLayout({ children }: LayoutProps<"/">) { const locale = await getLocale(); return ( {children} ); }