peppa/apps/web/app/layout.tsx
Асель 358fb5c0e9 PEP-66: «стори» and «эпики» in web, bot, notifications, MCP texts, help; tab tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:28:42 +05:00

20 lines
817 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 "./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 (
<html lang="ru" className={cn(GeistSans.variable, GeistMono.variable, !light && "dark")}>
<body>{children}</body>
</html>
);
}