import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { headers } from "next/headers"; import { Manrope } from "next/font/google"; import LandingPageClient from "@/components/landing/LandingPageClient"; // Local/staging preview wrapper for the landing page rendered by app/page.tsx. // It remains host-gated and noindex so staging can be reviewed without creating // a second indexable URL on hivegrid.de. export const metadata: Metadata = { title: "Playground (dev)", robots: { index: false, follow: false }, }; // Render at request time so the gate below reads the live request host + runtime // env — the same built image is enabled on staging and disabled on prod. export const dynamic = "force-dynamic"; // Playground-only font test: Manrope is a bit warmer + more geometric than // Inter — grounded without feeling SF-style. Scoped to /playground only so we // can A/B it without touching the live font. const manrope = Manrope({ subsets: ["latin"], variable: "--font-playground", weight: ["400", "500", "600", "700", "800"], display: "swap", }); export default async function PlaygroundPage() { const hdrs = await headers(); const host = (hdrs.get("x-forwarded-host") || hdrs.get("host") || "").toLowerCase(); const enabled = process.env.NODE_ENV !== "production" || // local dev process.env.SHOW_PLAYGROUND === "1" || // manual override host.startsWith("staging.") || // staging.hivegrid.de → auto-on host.includes("localhost") || host.startsWith("127.0.0.1"); if (!enabled) { notFound(); } return (
); }