| 1 | import Link from "next/link"; |
| 2 | import { LegalTabs } from "@/components/legal-tabs"; |
| 3 | import { PageHeader } from "@/components/page-header"; |
| 4 | import { getChrome, getLegalTerms } from "@/lib/i18n/dictionaries"; |
| 5 | import { buildPageMetadata } from "@/lib/page-meta"; |
| 6 | import { formatLegalDocumentStatus, LEGAL_DOCUMENTS, TermsContent } from "@/lib/legal-copy"; |
| 7 | |
| 8 | export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) { |
| 9 | const { locale } = await params; |
| 10 | const t = getLegalTerms(locale); |
| 11 | return buildPageMetadata({ |
| 12 | path: "/legal/terms", |
| 13 | locale, |
| 14 | title: t.metaTitle, |
| 15 | description: t.metaDescription, |
| 16 | }); |
| 17 | } |
| 18 | |
| 19 | export default async function TermsPage({ params }: { params: Promise<{ locale: string }> }) { |
| 20 | const { locale } = await params; |
| 21 | const t = getLegalTerms(locale); |
| 22 | return ( |
| 23 | <> |
| 24 | <PageHeader |
| 25 | kicker={t.kicker} |
| 26 | title={t.title} |
| 27 | meta={formatLegalDocumentStatus("terms", getChrome(locale).dateLocale)} |
| 28 | /> |
| 29 | <div className="page-body"> |
| 30 | <div className="page-body-narrow"> |
| 31 | <LegalTabs locale={locale} current="terms" /> |
| 32 | <article className="prose legal-doc [&>section>p+p]:mt-[var(--space-4)]" data-legal-version={LEGAL_DOCUMENTS.terms.version} data-legal-status={LEGAL_DOCUMENTS.terms.status} data-legal-effective-at={LEGAL_DOCUMENTS.terms.effectiveAt ?? undefined}> |
| 33 | <TermsContent /> |
| 34 | <p className="status-line"> |
| 35 | <Link href={`/${locale}/legal/privacy`} className="link">{t.privacyLink}</Link> |
| 36 | <Link href={`/${locale}`} className="link">{t.homeLink}</Link> |
| 37 | </p> |
| 38 | </article> |
| 39 | </div> |
| 40 | </div> |
| 41 | </> |
| 42 | ); |
| 43 | } |
| 44 |