| 1 | import Link from "next/link"; |
| 2 | import { getLegalPrivacy, getLegalTerms } from "@/lib/i18n/dictionaries"; |
| 3 | |
| 4 | /** Terms | Privacy: page-level tabs between the two legal documents. */ |
| 5 | export function LegalTabs({ locale, current }: { locale: string; current: "terms" | "privacy" }) { |
| 6 | const termsLabel = getLegalPrivacy(locale).termsLink; |
| 7 | const privacyLabel = getLegalTerms(locale).privacyLink; |
| 8 | return ( |
| 9 | <nav className="tabs legal-tabs" aria-label={`${termsLabel} · ${privacyLabel}`}> |
| 10 | <Link href={`/${locale}/legal/terms`} className="tab" aria-current={current === "terms" ? "page" : undefined}> |
| 11 | {termsLabel} |
| 12 | </Link> |
| 13 | <Link href={`/${locale}/legal/privacy`} className="tab" aria-current={current === "privacy" ? "page" : undefined}> |
| 14 | {privacyLabel} |
| 15 | </Link> |
| 16 | </nav> |
| 17 | ); |
| 18 | } |
| 19 |