@@ -39,7 +39,7 @@ const isServer = typeof window === 'undefined';
39
39
class DashboardsPage extends PureComponent {
40
40
static propTypes = {
41
41
showMapMobile : PropTypes . bool ,
42
- closeMobileMap : PropTypes . func . isRequired ,
42
+ setShowMap : PropTypes . func . isRequired ,
43
43
links : PropTypes . array ,
44
44
widgetAnchor : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
45
45
setWidgetsCategory : PropTypes . func ,
@@ -108,15 +108,15 @@ class DashboardsPage extends PureComponent {
108
108
} ;
109
109
110
110
renderMap = ( ) => {
111
- const { showMapMobile, closeMobileMap } = this . props ;
111
+ const { showMapMobile, setShowMap } = this . props ;
112
112
113
113
return (
114
114
< div className = "map-container" >
115
115
{ showMapMobile && (
116
116
< Button
117
117
theme = "square theme-button-light"
118
118
className = "close-map-button"
119
- onClick = { closeMobileMap }
119
+ onClick = { ( ) => setShowMap ( false ) }
120
120
>
121
121
< Icon icon = { closeIcon } />
122
122
</ Button >
@@ -196,7 +196,9 @@ class DashboardsPage extends PureComponent {
196
196
{ this . renderMap ( ) }
197
197
</ Sticky >
198
198
</ Media >
199
- < Media lessThan = "md" > { this . renderMap ( ) } </ Media >
199
+ < Media lessThan = "md" className = "mobile-map" >
200
+ { this . renderMap ( ) }
201
+ </ Media >
200
202
</ div >
201
203
< MapControls className = "map-controls" />
202
204
< Share />
0 commit comments