peppa/apps/web/app/layout.tsx
Асель 80a3bb79ad PEP-97: the name users see is «Peppa FACTORY» everywhere
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:34:03 +05:00

24 lines
987 B
TypeScript

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 { ErrorReporter } from "@/components/ErrorReporter";
import "./app.css";
export const metadata = { title: "Peppa FACTORY", description: "Peppa FACTORY: опишите идею словами — ИИ-агенты сделают продукт", icons: { icon: "/icon.svg" } };
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 (
<html lang="ru" className={cn(GeistSans.variable, GeistMono.variable, !light && "dark")}>
<body>
<ErrorReporter />
{children}
</body>
</html>
);
}