mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
The hand-written TSX privacy/terms/cookies were a SECOND source that had drifted from the markdown stack and, worse, presented as in-force while the canonical set is draft-pending-counsel. Now one source (content/legal/*.md), one render (components/legal/document.tsx -> Prose), four routes; /privacy /terms /cookies keep their URLs (footer/SEO intact) rendering the canonical content with rel=canonical -> /legal/<slug>, all showing the draft notice. Ported the carrier-mandated SMS/10DLC disclosures verbatim into privacy.md/terms.md (dropping them was a real compliance regression). Fixed a dead #privacy-policy anchor. Repointed every consumer to /legal/<slug>. Removed all legal-surface Tailwind: 5241->4858, -438 lines. Five substantive conflicts (age 16 vs 18, research default, never-train, liability cap, price notice) are FLAGGED for counsel, not silently reconciled — canonical stands alone.
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { LegalDocument } from '@/components/legal/document'
|
|
import { legalDoc, legalSlugs } from '@/lib/legal'
|
|
|
|
/**
|
|
* One legal document, at the address every Hanzo surface links to.
|
|
*
|
|
* `content/legal/*.md` is the one authoritative version of each of these; this
|
|
* route is what makes it readable. Before it existed the documents shipped in
|
|
* the repository and nowhere else, so /trust offered the DPA and the
|
|
* subprocessor register as published documents and both addresses 404'd, and
|
|
* the 48 `/legal/*` cross-links the documents make to each other all dangled.
|
|
*
|
|
* The render itself is `components/legal/document` — shared with the three
|
|
* short addresses (`/privacy`, `/terms`, `/cookies`) so one document cannot be
|
|
* drawn two ways.
|
|
*/
|
|
|
|
export const dynamicParams = false
|
|
|
|
export function generateStaticParams() {
|
|
return legalSlugs().map((slug) => ({ slug }))
|
|
}
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
|
|
const doc = legalDoc((await params).slug)
|
|
if (!doc) return {}
|
|
return { title: `${doc.title} — Hanzo`, description: doc.summary }
|
|
}
|
|
|
|
export default async function LegalDocumentPage({ params }: { params: Promise<{ slug: string }> }) {
|
|
return <LegalDocument slug={(await params).slug} />
|
|
}
|