Commit 27bdabcf authored by Paul Kaplan's avatar Paul Kaplan

Fix trailing slash breaking tab navigation

parent ec5d4247
......@@ -3,8 +3,8 @@ import {useRouteMatch, NavLink} from 'react-router-dom';
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
const StudioTabNav = () => {
const match = useRouteMatch();
const {params: {studioPath, studioId}} = useRouteMatch();
const base = `/${studioPath}/${studioId}`;
return (
<SubNavigation
align="left"
......@@ -12,26 +12,26 @@ const StudioTabNav = () => {
>
<NavLink
activeClassName="active"
to={`${match.url}`}
to={base}
exact
>
<li>Projects</li>
</NavLink>
<NavLink
activeClassName="active"
to={`${match.url}/curators`}
to={`${base}/curators`}
>
<li>Curators</li>
</NavLink>
<NavLink
activeClassName="active"
to={`${match.url}/comments`}
to={`${base}/comments`}
>
<li> Comments</li>
</NavLink>
<NavLink
activeClassName="active"
to={`${match.url}/activity`}
to={`${base}/activity`}
>
<li>Activity</li>
</NavLink>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment