diff --git a/src/app/[[...slug]]/page.tsx b/src/app/[[...slug]]/page.tsx index 2dbefa7..c59b55f 100644 --- a/src/app/[[...slug]]/page.tsx +++ b/src/app/[[...slug]]/page.tsx @@ -34,7 +34,7 @@ const DocsPage = async ({ const decodedSlug: string = decodeURIComponent(slug || ""); const page: DocsContentMetadata | undefined = pages.find( (metadata: DocsContentMetadata): boolean => - metadata.slug === (decodedSlug || "intro") + metadata.slug === (decodedSlug || pages[0].slug) ); if (!page) { notFound(); diff --git a/src/components/docs-footer.tsx b/src/components/docs-footer.tsx index d4bf00e..20c08cb 100644 --- a/src/components/docs-footer.tsx +++ b/src/components/docs-footer.tsx @@ -17,7 +17,8 @@ const DocsFooter = ({ const current: number = pages.findIndex( (page: DocsContentMetadata) => - (path === "/" && page.slug === "intro") || path === `/${page.slug}` + (path === "/" && page.slug === pages[0].slug) || + path === `/${page.slug}` ); const previous: DocsContentMetadata | undefined = current > 0 ? pages[current - 1] : undefined; diff --git a/src/components/sidebar/sidebar-links.tsx b/src/components/sidebar/sidebar-links.tsx index b66fe4f..42bf2eb 100644 --- a/src/components/sidebar/sidebar-links.tsx +++ b/src/components/sidebar/sidebar-links.tsx @@ -22,7 +22,7 @@ const SidebarLinks = ({ return (