Files
basiclean-webapp/app/branchenloesungen/[slug]/page.tsx
T
2026-08-12 11:06:10 +02:00

35 lines
704 B
TypeScript

import { notFound } from "next/navigation";
import Image from "next/image";
import { branchenloesungen } from "../data";
export function generateStaticParams() {
return branchenloesungen.map((item) => ({
slug: item.slug,
}));
}
export default async function LeistungDetail({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const leistung = branchenloesungen.find((item) => item.slug === slug);
if (!leistung) notFound();
return (
<main>
<h1>{leistung.title}</h1>
<p>{leistung.text}</p>
<Image
src={leistung.image}
alt={leistung.title}
width={1200}
height={800}
/>
</main>
);
}