diff --git a/nx-dev/feature-doc-viewer/src/lib/sidebar.tsx b/nx-dev/feature-doc-viewer/src/lib/sidebar.tsx index f0cffe0b7c..f6a5a333f1 100644 --- a/nx-dev/feature-doc-viewer/src/lib/sidebar.tsx +++ b/nx-dev/feature-doc-viewer/src/lib/sidebar.tsx @@ -75,7 +75,7 @@ export function Sidebar({ menu, navIsOpen }: SidebarProps) { }))} selected={{ label: flavor.name, value: flavor.alias }} onChange={(item) => - router.push( + !!router.push( createNextPath(version.alias, item.value, router.asPath) ) && item.data && @@ -89,8 +89,8 @@ export function Sidebar({ menu, navIsOpen }: SidebarProps) { data-testid="navigation" className="px-1 pt-1 font-medium text-base sm:px-3 xl:px-5 lg:text-sm pb-10 lg:pb-14 sticky?lg:h-(screen-18)" > - {menu.sections.map((section) => ( - + {menu.sections.map((section, index) => ( + ))} @@ -111,8 +111,8 @@ function SidebarSection({ section }: { section: MenuSection }) { )} @@ -153,10 +153,13 @@ function SidebarSectionItems({ item }: { item: MenuItem }) { )}