fix(build): resolve next.js 15 generateStaticParams type/runtime error for nested dynamic segments
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 22s
Build & Deploy / 🧪 QA (push) Successful in 1m2s
Build & Deploy / 🏗️ Build (push) Successful in 2m43s
Build & Deploy / 🚀 Deploy (push) Successful in 28s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 45s
Build & Deploy / 🔔 Notify (push) Successful in 4s

This commit is contained in:
2026-05-14 11:36:55 +02:00
parent 8d2eb8bf0c
commit 42d15fb0ff

View File

@@ -38,10 +38,13 @@ export async function generateMetadata({ params }: PageProps): Promise<Metadata>
};
}
export async function generateStaticParams({ params }: { params: { locale: string } }) {
const references = await getAllReferences(params.locale);
export async function generateStaticParams(props: any) {
const params = await props.params;
const locale = params?.locale || 'de'; // fallback to 'de' if undefined
const references = await getAllReferences(locale);
return references.map((ref) => ({
slug: ref.slug,
locale
}));
}