peppa/apps/web/app/layout.tsx
peppa-bot f3d10a4c25 PEP-243: платформа называется FORGE — название во всех текстах для людей и подсказках агентам, адрес forge.telecom.quest
«Peppa FACTORY» → «FORGE» в экранах, сообщениях, словарях en/kk, шаблоне и тестах; «Пеппа» → «FORGE» в подсказках
агентам и правилах; логотип, значок, версия кэша service worker; в словаре старые названия — в «Нельзя».
Внутренние имена (CLI peppa, PEPPA_*, MCP-сервер peppa, ключи PEP-N) не меняются. Второй адрес — в mac-route.sh.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 11:18:49 +05:00

33 lines
1.3 KiB
TypeScript

import type { ReactNode } from "react";
import { cookies } from "next/headers";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
import { productName } from "@peppa/shared/i18n";
import { cn } from "@/lib/utils";
import { THEME_COOKIE } from "@/lib/theme";
import { getLocale, getT } from "@/lib/i18n";
import { ErrorReporter } from "@/components/ErrorReporter";
import { I18nProvider } from "@/components/I18n";
import "./app.css";
export async function generateMetadata() {
const t = await getT();
return { title: productName(t.locale), description: t("FORGE: опишите идею словами — ИИ-агенты сделают продукт"), 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";
const locale = await getLocale();
return (
<html lang={locale === "kk" ? "kk" : locale} className={cn(GeistSans.variable, GeistMono.variable, !light && "dark")}>
<body>
<I18nProvider locale={locale}>
<ErrorReporter />
{children}
</I18nProvider>
</body>
</html>
);
}