From cba03399cbf780c4a848d8c5ed02fbcfcc1799ac Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Wed, 10 May 2023 02:08:53 +0200 Subject: [PATCH] fix nav --- src/components/Layout.jsx | 5 +---- src/components/NavigationAPI.jsx | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 7d8252f3..69663c23 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -133,10 +133,7 @@ export function Layout({ children, title, tableOfContents }) { section.links.find((link) => link.href === router.pathname) ) - let currentSection - if(!router.route.startsWith("/ipa")) { - currentSection = useTableOfContents(tableOfContents) - } + let currentSection = useTableOfContents(tableOfContents) function isActive(section) { if (section.id === currentSection) { diff --git a/src/components/NavigationAPI.jsx b/src/components/NavigationAPI.jsx index dc57bf78..bb0e2dea 100644 --- a/src/components/NavigationAPI.jsx +++ b/src/components/NavigationAPI.jsx @@ -162,8 +162,7 @@ function NavigationGroup({ group, className, tableOfContents }) { transition: { duration: 0.15 }, }} > - {console.log(tableOfContents.tableOfContents)} - {tableOfContents.tableOfContents.map((section) => ( + {router.route.startsWith("/ipa/resources") && tableOfContents.tableOfContents.map((section) => (