import type { Metadata } from "next"; import Link from "next/link"; import { Reveal } from "../components/Reveal"; import { Footer } from "../components/Footer"; import { VersandSections } from "./components/VersandSections"; import { VersandTOC, MobileVersandTOC } from "./components/VersandTOC"; import { getShippingSettings, getShippingMethods } from "../lib/payload"; export const metadata: Metadata = { title: "Versand", description: "Versandkosten, Lieferzeiten und Liefergebiet für Bestellungen bei einfach produktiv.", alternates: { canonical: "/versand" }, }; export default async function VersandPage() { const [shipping, shippingMethods] = await Promise.all([getShippingSettings(), getShippingMethods()]); // Same "first active method / lowest threshold among active methods" // convention as CartContent.tsx/getTrustBadges() — see VersandSections.tsx. const shippingCost = shippingMethods[0]?.price ?? 0; const shippingMethodThresholds = shippingMethods.map((m) => m.freeShippingThreshold).filter((t): t is number => t !== null); const freeShippingThreshold = shippingMethodThresholds.length > 0 ? Math.min(...shippingMethodThresholds) : null; return ( <>

Startseite Versand

Versand

Transparent, fair und pünktlich — alles zu Kosten, Lieferzeiten und Liefergebiet.

{/* MobileSectionTOC counterpart — below lg: only, see SectionTOC.tsx's own comment. */}