import Link from "next/link"; import { content, pages, type SeoPage } from "@/lib/content"; export function breadcrumbPages(page: SeoPage): SeoPage[] { if (page.path === "/") return []; const parentPath = page.path.startsWith("/services/") ? "/services" : page.path.startsWith("/blog/") ? "/blog" : null; const parent = parentPath ? pages.find((candidate) => candidate.path === parentPath) : undefined; return [...(parent ? [parent] : []), page]; } type LegacyItem = { label: string; href?: string }; export default function Breadcrumbs({ page, items }: { page?: SeoPage; items?: LegacyItem[] }) { if (items) return ; if (!page) return null; const crumbs = breadcrumbPages(page); if (!crumbs.length) return null; return ; }