All checks were successful
Deploy Trade-In / changes (push) Successful in 12s
Deploy Trade-In / test (push) Has been skipped
Deploy Trade-In / build-browser (push) Has been skipped
Deploy Trade-In / build-backend (push) Has been skipped
Deploy Trade-In / build-frontend (push) Successful in 2m11s
Deploy Trade-In / deploy (push) Successful in 51s
58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
import type { Metadata } from "next";
|
||
import { IBM_Plex_Mono, Manrope } from "next/font/google";
|
||
|
||
import { SupportButton } from "@/components/trade-in/v2/SupportButton";
|
||
import { SupportChatProvider } from "@/components/trade-in/v2/SupportChatContext";
|
||
import { pageBg } from "@/components/trade-in/v2/tokens";
|
||
|
||
// Manrope — primary sans typeface of the МЕРА HUD. next/font is bundled
|
||
// (no package.json change). Cyrillic + latin so RU labels render correctly.
|
||
const manrope = Manrope({
|
||
subsets: ["latin", "cyrillic"],
|
||
weight: ["200", "300", "400", "500", "600", "700"],
|
||
variable: "--font-manrope",
|
||
display: "swap",
|
||
});
|
||
|
||
// IBM Plex Mono — cockpit numerals / mono labels.
|
||
const plexMono = IBM_Plex_Mono({
|
||
subsets: ["latin", "cyrillic"],
|
||
weight: ["300", "400", "500"],
|
||
variable: "--font-plex-mono",
|
||
display: "swap",
|
||
});
|
||
|
||
export const metadata: Metadata = {
|
||
title: "МЕРА · Оценка v2",
|
||
};
|
||
|
||
export default function TradeInV2Layout({
|
||
children,
|
||
}: {
|
||
children: React.ReactNode;
|
||
}) {
|
||
return (
|
||
<div
|
||
className={`${manrope.variable} ${plexMono.variable}`}
|
||
style={{
|
||
minHeight: "100vh",
|
||
background: pageBg,
|
||
display: "flex",
|
||
justifyContent: "center",
|
||
alignItems: "flex-start",
|
||
}}
|
||
>
|
||
{/* SupportChatProvider wraps both {children} (TopNav's "Помощь" item
|
||
lives deep inside it, in page.tsx) and <SupportButton /> (mounted
|
||
here as a sibling, portaled to document.body) — they share one
|
||
open/closed chat state via context, see SupportChatContext.tsx. */}
|
||
<SupportChatProvider>
|
||
{children}
|
||
{/* Mounted here (not the global app/layout.tsx) — that layout also
|
||
covers the admin `/scrapers/**` area and `/sale-share`, unrelated
|
||
products without the МЕРА brand that don't need a support link. */}
|
||
<SupportButton />
|
||
</SupportChatProvider>
|
||
</div>
|
||
);
|
||
}
|