diff --git a/src/app/[[...slug]]/page.tsx b/src/app/[[...slug]]/page.tsx index 89b9b61..cb3cf27 100644 --- a/src/app/[[...slug]]/page.tsx +++ b/src/app/[[...slug]]/page.tsx @@ -26,15 +26,16 @@ const DocsPage = async ({ }: { params: Promise<{ slug: string[] }>; }): Promise => { - const slug: string = decodeURIComponent( - (((await params).slug as string[]) || undefined)?.join("/") + const slug: string = (((await params).slug as string[]) || undefined)?.join( + "/" ); // Get the content to display based on the provided slug const pages: DocsContentMetadata[] = getDocsContent(); + const decodedSlug: string = decodeURIComponent(slug || ""); const page: DocsContentMetadata | undefined = pages.find( (metadata: DocsContentMetadata): boolean => - metadata.slug === (slug || "intro") + metadata.slug === (decodedSlug || "intro") ); if (!page) { notFound();