mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 23:57:55 -05:00
Fix trailing slash breaking tab navigation
This commit is contained in:
parent
ec5d424719
commit
27bdabcfeb
1 changed files with 6 additions and 6 deletions
|
@ -3,8 +3,8 @@ import {useRouteMatch, NavLink} from 'react-router-dom';
|
||||||
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
|
import SubNavigation from '../../components/subnavigation/subnavigation.jsx';
|
||||||
|
|
||||||
const StudioTabNav = () => {
|
const StudioTabNav = () => {
|
||||||
const match = useRouteMatch();
|
const {params: {studioPath, studioId}} = useRouteMatch();
|
||||||
|
const base = `/${studioPath}/${studioId}`;
|
||||||
return (
|
return (
|
||||||
<SubNavigation
|
<SubNavigation
|
||||||
align="left"
|
align="left"
|
||||||
|
@ -12,26 +12,26 @@ const StudioTabNav = () => {
|
||||||
>
|
>
|
||||||
<NavLink
|
<NavLink
|
||||||
activeClassName="active"
|
activeClassName="active"
|
||||||
to={`${match.url}`}
|
to={base}
|
||||||
exact
|
exact
|
||||||
>
|
>
|
||||||
<li>Projects</li>
|
<li>Projects</li>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<NavLink
|
<NavLink
|
||||||
activeClassName="active"
|
activeClassName="active"
|
||||||
to={`${match.url}/curators`}
|
to={`${base}/curators`}
|
||||||
>
|
>
|
||||||
<li>Curators</li>
|
<li>Curators</li>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<NavLink
|
<NavLink
|
||||||
activeClassName="active"
|
activeClassName="active"
|
||||||
to={`${match.url}/comments`}
|
to={`${base}/comments`}
|
||||||
>
|
>
|
||||||
<li> Comments</li>
|
<li> Comments</li>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<NavLink
|
<NavLink
|
||||||
activeClassName="active"
|
activeClassName="active"
|
||||||
to={`${match.url}/activity`}
|
to={`${base}/activity`}
|
||||||
>
|
>
|
||||||
<li>Activity</li>
|
<li>Activity</li>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
|
Loading…
Reference in a new issue