diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index 5f8c7cf9..4a60eec6 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -30,7 +30,7 @@ function Nav({ docs, asPath }: { docs: Doc[]; asPath: string }) { const nav = React.useMemo( () => docs.reduce((acc, doc) => { - const [, ...rest] = doc.slug + const [...rest] = doc.slug const [page, category] = rest.reverse() if (category && !acc[category]) acc[category] = {} @@ -43,6 +43,7 @@ function Nav({ docs, asPath }: { docs: Doc[]; asPath: string }) { }, {} as NavList), [docs] ) + console.log('nav', nav) return (