mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-17 16:06:36 +00:00
fix nav
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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}`}
|
||||
|
||||
Reference in New Issue
Block a user