diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index 3de9972..1873fc9 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -6,7 +6,7 @@ import Footer from "@/components/marketing/Footer"; import ScrollReveal from "@/components/animations/ScrollReveal"; import { getBlogPost, getBlogPosts, getSiteConfig } from "@/lib/content"; -type Props = { params: { slug: string } }; +type Props = { params: Promise<{ slug: string }> }; // Corps des articles — FUTURE: champ rich text Payload CMS const articleContenu: Record = { @@ -69,7 +69,7 @@ export async function generateStaticParams() { export async function generateMetadata( { params }: Props ): Promise { - const { slug } = params; + const { slug } = await params; const [post, config] = await Promise.all([getBlogPost(slug), getSiteConfig()]); if (!post) return { title: "Article introuvable" }; return { @@ -80,7 +80,7 @@ export async function generateMetadata( } export default async function BlogArticlePage({ params }: Props) { - const { slug } = params; + const { slug } = await params; const post = await getBlogPost(slug); if (!post) notFound();