From 75107dd591b15a5b989614852b977446663b164d Mon Sep 17 00:00:00 2001 From: esikkala <esko.ikkala@aalto.fi> Date: Tue, 25 Sep 2018 20:59:27 +0300 Subject: [PATCH] Fix one column layout --- src/client/components/TopBar.js | 5 +++++ src/client/components/map/LeafletMap.js | 2 +- src/client/containers/MapApp.js | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/components/TopBar.js b/src/client/components/TopBar.js index eea77f69..4abf0830 100644 --- a/src/client/components/TopBar.js +++ b/src/client/components/TopBar.js @@ -67,6 +67,10 @@ class TopBar extends React.Component { anchorEl: null, }; + componentDidMount() { + this.props.fetchManuscripts(); + } + handleClick = event => { this.setState({ anchorEl: event.currentTarget }); }; @@ -160,6 +164,7 @@ TopBar.propTypes = { oneColumnView: PropTypes.bool.isRequired, mapMode: PropTypes.string.isRequired, resultFormat: PropTypes.string.isRequired, + fetchManuscripts: PropTypes.func.isRequired, updateResultFormat: PropTypes.func.isRequired, updateMapMode: PropTypes.func.isRequired, datasets: PropTypes.object.isRequired, diff --git a/src/client/components/map/LeafletMap.js b/src/client/components/map/LeafletMap.js index 781db8d2..a2232403 100644 --- a/src/client/components/map/LeafletMap.js +++ b/src/client/components/map/LeafletMap.js @@ -34,7 +34,7 @@ const style = { class LeafletMap extends React.Component { componentDidMount() { - this.props.fetchManuscripts(); + //this.props.fetchManuscripts(); this.props.fetchPlaces(); // Base layers diff --git a/src/client/containers/MapApp.js b/src/client/containers/MapApp.js index 882c2e2c..f6b51909 100644 --- a/src/client/containers/MapApp.js +++ b/src/client/containers/MapApp.js @@ -235,7 +235,7 @@ let MapApp = (props) => { case 'map': { mainResultsView = ( <div className={classes.fullMap}> - {map} + {mapElement} </div> ); break; @@ -261,6 +261,7 @@ let MapApp = (props) => { resultFormat={options.resultFormat} updateMapMode={props.updateMapMode} updateResultFormat={props.updateResultFormat} + fetchManuscripts={props.fetchManuscripts} datasets={search.datasets} toggleDataset={props.toggleDataset} /> -- GitLab