This commit is contained in:
Pascal Fischer
2023-05-10 02:08:53 +02:00
parent 2f252643bc
commit cba03399cb
2 changed files with 2 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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) => (
<li key={section.id}>
<NavLink
href={`${link.href}#${section.id}`}