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, MobileSectionTOC } from "../components/SectionTOC"; import { getLegalPage, getCompanySettings } from "../lib/payload"; import { formatMonthYear } from "../lib/format"; import { VerantwortlicherBlock, verantwortlicherHeadings } from "./components/VerantwortlicherBlock"; export const metadata: Metadata = { title: "Datenschutzerklärung", description: "Datenschutzerklärung von einfach produktiv — wie wir mit deinen Daten umgehen.", alternates: { canonical: "/datenschutz" }, }; export default async function DatenschutzPage() { const { isEnabled: isPreview } = await draftMode(); const [page, seller] = await Promise.all([getLegalPage("datenschutz", { draft: isPreview }), getCompanySettings()]); // "1. Verantwortlicher" headings first — that block renders above the // CMS content below (same reasoning as Impressum's own headings // composition, see AnbieterAngaben.tsx). const headings = [...verantwortlicherHeadings(), ...(page ? extractHeadings(page.content) : [])]; return ( <>

Startseite Datenschutz

Datenschutzerklärung

{page &&

Stand: {formatMonthYear(page.updatedAt)}

}
{/* MobileSectionTOC — below lg: only, see SectionTOC.tsx's own comment. Outside the sidebar's `hidden lg:flex` wrapper below (that wrapper's `hidden` would hide this too otherwise). */}
{/* Static, not part of the CMS content — same reasoning as the Impressum page's Nachhaltigkeit card: a bespoke brand callout doesn't belong in the generic LegalPages richText field shared across all 4 legal page types. */}

Nachhaltigkeit ist für uns mehr als ein Schlagwort.

Auch im digitalen Raum gehen wir bewusst und verantwortungsvoll mit Daten um.

{/* Name/Adresse/E-Mail kommen direkt aus company-settings, nicht aus der CMS-Richtext unten — single-sourced, gleiche Begründung wie Impressum's AnbieterAngaben.tsx. */} {seller && } {page ? ( isPreview ? : ) : (

Inhalte werden gerade aktualisiert.

)}