import type { Metadata, Viewport } from "next"; import { Lora, Geist_Mono } from "next/font/google"; import { headers } from "next/headers"; import { Providers } from "@/components/providers"; import { auth } from "@/lib/auth/server"; import type { Locale } from "@/lib/i18n/provider"; import { SwRegister } from "@/components/pwa/sw-register"; import "./globals.css"; const lora = Lora({ variable: "--font-lora", subsets: ["latin"], display: "swap", }); const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], }); export const metadata: Metadata = { title: { default: "Epicure", template: "%s | Epicure" }, description: "Your personal AI-powered recipe book.", manifest: "/manifest.json", }; export const viewport: Viewport = { themeColor: "#18181b", }; export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { const session = await auth.api.getSession({ headers: await headers() }).catch(() => null); const initialLocale = ((session?.user as { locale?: string })?.locale ?? "en") as Locale; return (