import type { Metadata } from "next"; import { PageHeader } from "@/components/PageHeader"; import { Section } from "@/components/Section"; import { Reveal } from "@/components/Reveal"; import { EventTeaserCard } from "@/components/EventTeaserCard"; import { ArrowLink } from "@/components/ArrowLink"; import { getAllEvents } from "@/lib/payload/content"; import { buildMetadata } from "@/lib/seo/metadata"; import { getSiteUrl } from "@/lib/seo/config"; import { JsonLd, webPageJsonLd } from "@/lib/seo/jsonld"; export const dynamic = "force-dynamic"; const DESCRIPTION = "Aktuelle Termine und Veranstaltungen von Anouma."; export async function generateMetadata(): Promise { return buildMetadata({ title: "Termine", description: DESCRIPTION, path: "/termine" }); } export default async function TerminePage() { const events = await getAllEvents(); const today = new Date(); today.setHours(0, 0, 0, 0); const upcoming = events .filter((e) => new Date(e.date) >= today) .sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); const past = events.filter((e) => new Date(e.date) < today); const siteUrl = await getSiteUrl(); return ( <>
{upcoming.length === 0 ? (

Aktuell sind keine Termine geplant

Schau gerne bald wieder vorbei, oder melde dich direkt - ich freue mich von dir zu hören.

Zur Kontaktseite
) : (
{upcoming.map((event, i) => ( ))}
)}
{past.length > 0 && (

Vergangene Termine

{past.map((event) => (
))}
)} ); }