import type { ReactNode } from "react"; import { cookies } from "next/headers"; import { GeistSans } from "geist/font/sans"; import { GeistMono } from "geist/font/mono"; import { cn } from "@/lib/utils"; import { THEME_COOKIE } from "@/lib/theme"; import "./app.css"; export const metadata = { title: "Peppa", description: "Софтвейр-фабрика: проекты, задачи и агенты" }; export default async function RootLayout({ children }: { children: ReactNode }) { // Dark by default; the cookie is read on the server so a light choice renders without a dark flash. const light = (await cookies()).get(THEME_COOKIE)?.value === "light"; return ( {children} ); }