mirror of
https://github.com/netbirdio/docs.git
synced 2026-10-04 12:49:04 +02: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)
|
section.links.find((link) => link.href === router.pathname)
|
||||||
)
|
)
|
||||||
|
|
||||||
let currentSection
|
let currentSection = useTableOfContents(tableOfContents)
|
||||||
if(!router.route.startsWith("/ipa")) {
|
|
||||||
currentSection = useTableOfContents(tableOfContents)
|
|
||||||
}
|
|
||||||
|
|
||||||
function isActive(section) {
|
function isActive(section) {
|
||||||
if (section.id === currentSection) {
|
if (section.id === currentSection) {
|
||||||
|
|||||||
@@ -162,8 +162,7 @@ function NavigationGroup({ group, className, tableOfContents }) {
|
|||||||
transition: { duration: 0.15 },
|
transition: { duration: 0.15 },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{console.log(tableOfContents.tableOfContents)}
|
{router.route.startsWith("/ipa/resources") && tableOfContents.tableOfContents.map((section) => (
|
||||||
{tableOfContents.tableOfContents.map((section) => (
|
|
||||||
<li key={section.id}>
|
<li key={section.id}>
|
||||||
<NavLink
|
<NavLink
|
||||||
href={`${link.href}#${section.id}`}
|
href={`${link.href}#${section.id}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user