qazaq-legacy-foundation-web/src/components/Footer.tsx

21 lines
1.0 KiB
TypeScript

import Link from 'next/link'
import type { Dict, Locale } from '@/i18n'
import { isLegalPublished, type CmsLegal } from '@/lib/legal-model'
export function Footer({ t, locale, legal }: { t: Dict; locale: Locale; legal: CmsLegal | null }) {
return (
<footer className="border-t border-line">
<div className="mx-auto flex max-w-6xl flex-col gap-4 px-5 py-10 text-sm text-muted sm:px-8 md:flex-row md:items-center md:justify-between">
<p>
© {new Date().getFullYear()} {t.siteName}. {t.footer}
</p>
<nav className="flex flex-wrap gap-x-6 gap-y-2">
<Link href={`/${locale}/contacts`} className="hover:text-burgundy">{t.contacts.title}</Link>
{isLegalPublished(legal?.privacy) && <Link href={`/${locale}/privacy`} className="hover:text-burgundy">{t.legal.privacy.title}</Link>}
{isLegalPublished(legal?.terms) && <Link href={`/${locale}/terms`} className="hover:text-burgundy">{t.legal.termsShort}</Link>}
</nav>
</div>
</footer>
)
}