diff --git a/docs/content/NavList.mdx b/docs/content/NavList.mdx index b016fa8108d..4cc7d78dc2b 100644 --- a/docs/content/NavList.mdx +++ b/docs/content/NavList.mdx @@ -210,7 +210,10 @@ import {NavList} from '@primer/react' function NavItem({href, children}) { const router = useRouter() - const isCurrent = router.asPath === href + const isCurrent = + typeof href === 'string' + ? router.asPath === href + : router.pathname === href.pathname; return ( {children} @@ -224,6 +227,14 @@ function App() { Dashboard Pull requests Issues + + Summary + ) }