fix: Tabs on document references don't show active state

'Referenced by' -> 'Backlinks'
This commit is contained in:
Tom Moor
2022-04-17 11:42:55 -07:00
parent 2fb0182e16
commit 48893f727e
3 changed files with 50 additions and 27 deletions

View File

@@ -14,9 +14,11 @@ function NavLinkWithChildrenFunc(
) {
return (
<Route path={to} exact={exact}>
{({ match }) => (
{({ match, location }) => (
<NavLink {...rest} to={to} exact={exact} ref={ref}>
{children ? children(match) : null}
{children
? children(rest.isActive ? rest.isActive(match, location) : match)
: null}
</NavLink>
)}
</Route>