b8cf7cfbcb
Adds About, Contact, Services (index + 8) and Industries (index + 7), generated from structured JSON converted out of the .docx copy decks by scripts/convert-docs.py. Shared header with dropdowns, footer, contact form (mailto until a backend exists), FAQ/breadcrumb JSON-LD, sitemap and robots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { Suspense } from "react";
|
|
import { notFound } from "next/navigation";
|
|
import ContentPage from "@/components/content/content-page";
|
|
import { getIndustry } from "@/lib/pages";
|
|
import { pageMetadata } from "@/lib/metadata";
|
|
import { industryNav } from "@/lib/routes";
|
|
|
|
type Params = PageProps<"/industries/[slug]">["params"];
|
|
|
|
export function generateStaticParams() {
|
|
return industryNav.map((s) => ({ slug: s.slug }));
|
|
}
|
|
|
|
export async function generateMetadata({ params }: PageProps<"/industries/[slug]">) {
|
|
const { slug } = await params;
|
|
const page = getIndustry(slug);
|
|
return page ? pageMetadata(page) : {};
|
|
}
|
|
|
|
export default function Page({ params }: PageProps<"/industries/[slug]">) {
|
|
return (
|
|
<Suspense fallback={<section className="hero page-hero" aria-busy="true" />}>
|
|
<Content params={params} />
|
|
</Suspense>
|
|
);
|
|
}
|
|
|
|
async function Content({ params }: { params: Params }) {
|
|
const { slug } = await params;
|
|
const page = getIndustry(slug);
|
|
if (!page) notFound();
|
|
const name = industryNav.find((s) => s.slug === slug)?.name ?? slug;
|
|
|
|
return (
|
|
<ContentPage
|
|
page={page}
|
|
crumbs={[
|
|
{ name: "Home", href: "/" },
|
|
{ name: "Industries", href: "/industries" },
|
|
{ name, href: `/industries/${slug}` },
|
|
]}
|
|
/>
|
|
);
|
|
}
|