import type { Metadata } from "next"; import Link from "next/link"; import Image from "next/image"; import { draftMode } from "next/headers"; import { Reveal } from "../components/Reveal"; import { Footer } from "../components/Footer"; import { RichText, extractHeadings } from "../components/RichText"; import { LiveRichText } from "../components/LiveRichText"; import { SectionTOC } from "../components/SectionTOC"; import { getLegalPage, getCompanySettings } from "../lib/payload"; import { AnbieterAngaben, anbieterAngabenHeadings } from "./components/AnbieterAngaben"; export const metadata: Metadata = { title: "Impressum", description: "Angaben gemäß § 5 TMG für einfach produktiv.", alternates: { canonical: "/impressum" }, }; export default async function ImpressumPage() { const { isEnabled: isPreview } = await draftMode(); const [page, seller] = await Promise.all([getLegalPage("impressum", { draft: isPreview }), getCompanySettings()]); // Anbieter-Angaben headings first — that block renders above the CMS // content below, so its TOC entries need to lead too, or the sidebar // would list sections in a different order than they actually appear. const headings = [...anbieterAngabenHeadings(seller), ...(page ? extractHeadings(page.content) : [])]; return ( <>

Startseite Impressum

Impressum

Angaben gemäß § 5 TMG

{/* Static, not part of the CMS content — the LegalPages collection's richText field is deliberately generic (shared shape across Impressum/Datenschutz/AGB/Widerruf), so a bespoke brand callout like this doesn't belong inside it; hardcoding it here matches how VersandSections.tsx keeps structural/brand elements in code and only pulls the actual numbers/copy that need single-sourcing from data. */}

Nachhaltigkeit

Diese Website wird mit Ökostrom betrieben und ist klimafreundlich gehostet.

Für eine bessere Zukunft – für uns alle.

{/* Seller identity (name/address/USt-ID/Handelsregister/ Geschäftsführung) comes straight from company-settings, not the CMS richText below — single-sourced so it can never drift out of sync with the same data the invoice PDFs and every email footer already use. See AnbieterAngaben.tsx. */} {seller && } {page ? ( isPreview ? : ) : (

Inhalte werden gerade aktualisiert.

)}