Skip to content
Snippets Groups Projects
Commit 97a20b32 authored by esikkala's avatar esikkala
Browse files

Keep main view link active for subviews

parent 09c570ec
No related branches found
No related tags found
No related merge requests found
......@@ -170,13 +170,14 @@ class TopBar extends React.Component {
</Menu>
);
const ManuscriptLink = props =>
const ManuscriptLink = props => (
<NavLink
to="/manuscripts/table"
className={classes.appBarButton}
isActive={(match, location) => location.pathname.startsWith('/manuscripts')}
activeClassName={classes.appBarButtonActive}
{...props}
/>;
/>);
const MainLink = props =>
<NavLink
......
......@@ -93,27 +93,25 @@ let MapApp = (props) => {
<div className={classes.appFrame}>
<TopBar />
<div className={classes.mainContainer}>
<Switch>
<Route
exact path="/"
component={Main}
/>
<Route
path="/manuscripts"
render={() =>
<Manuscripts
facet={facet}
map={map}
search={search}
fetchManuscripts={props.fetchManuscripts}
fetchPlaces={props.fetchPlaces}
fetchPlace={props.fetchPlace}
fetchFacet={props.fetchFacet}
fetchResults={props.fetchResults}
match={props.match}
/>}
/>
</Switch>
<Route
exact path="/"
component={Main}
/>
<Route
path="/manuscripts"
render={() =>
<Manuscripts
facet={facet}
map={map}
search={search}
fetchManuscripts={props.fetchManuscripts}
fetchPlaces={props.fetchPlaces}
fetchPlace={props.fetchPlace}
fetchFacet={props.fetchFacet}
fetchResults={props.fetchResults}
match={props.match}
/>}
/>
</div>
<Paper className={classes.footer}>
{/*<img className={classes.oxfordLogo} src='img/logos/oxford-logo-white.png' alt='Oxford University logo'/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment