Files
gov-portals-monorepo/DBIS/components/layout/Footer.tsx
2026-02-13 10:30:56 -08:00

49 lines
1.5 KiB
TypeScript

import Link from "next/link";
import { navItems } from "@/lib/nav-config";
const footerLinks = [
{ label: "About", href: "/about" },
{ label: "Documents", href: "/documents" },
{ label: "Transparency", href: "/transparency" },
{ label: "Contact", href: "/contact" },
{ label: "Regional Offices", href: "/regions" },
];
function flatNavItems(items: typeof navItems): { label: string; href: string }[] {
const out: { label: string; href: string }[] = [];
for (const item of items) {
if (item.children) {
for (const c of item.children) out.push({ label: c.label, href: c.href });
} else {
out.push({ label: item.label, href: item.href });
}
}
return out;
}
export function Footer() {
const flat = flatNavItems(navItems);
const keyLinks = footerLinks.length ? footerLinks : flat.slice(0, 6);
return (
<footer className="border-t border-neutral-200 bg-white">
<div className="container mx-auto px-4 py-8">
<div className="flex flex-wrap gap-6">
{keyLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className="text-sm text-neutral-600 hover:text-neutral-900 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 rounded"
>
{link.label}
</Link>
))}
</div>
<p className="mt-6 text-sm text-neutral-500">
Digital Bank of International Settlements. All portals follow the same tech stack and policies.
</p>
</div>
</footer>
);
}