diff --git a/src/components/CommentFormMap/CommentFormMap.jsx b/src/components/CommentFormMap/CommentFormMap.jsx index 42b2d6258..86678e165 100644 --- a/src/components/CommentFormMap/CommentFormMap.jsx +++ b/src/components/CommentFormMap/CommentFormMap.jsx @@ -64,8 +64,7 @@ class CommentFormMap extends React.Component { url={this.props.mapTileUrl} attribution='© OpenStreetMap contributors' /> - + {this.props.contents !== null &&
{this.props.contents}
} { {data.geojson && (
- {state.displayMap && data.geojson && ( diff --git a/src/components/Hearing/HearingMap.jsx b/src/components/Hearing/HearingMap.jsx index 8e301770f..f37a37ce7 100644 --- a/src/components/Hearing/HearingMap.jsx +++ b/src/components/Hearing/HearingMap.jsx @@ -6,12 +6,7 @@ import OverviewMap from '../OverviewMap'; const HearingMap = ({ hearing, ...props }) => (
- +
); diff --git a/src/components/OverviewMap.jsx b/src/components/OverviewMap.jsx index f2157ec3d..f599391d4 100644 --- a/src/components/OverviewMap.jsx +++ b/src/components/OverviewMap.jsx @@ -184,19 +184,19 @@ const OverviewMap = ({ mapElementLimit = 0, showOnCarousel = false, ...props }) * @returns {Bool} */ const shouldMapRender = () => (showOnCarousel ? dimensions.height && dimensions.width : true); - - /* eslint-disable react-hooks/exhaustive-deps */ + + /* eslint-disable react-hooks/exhaustive-deps */ useEffect(() => { getHearingMapContent(hearings); handleUpdateMapDimensions(mapContainer); // Add any other functions that should run on component mount or hearings change here - }, [hearings]); + }, [hearings]); if (typeof window === 'undefined') return null; if (!contents && props.hideIfEmpty) { return null; } - + return ( shouldMapRender() && ( { - + const [displayMap, setDisplayMap] = useState(false); const { comment, locale } = props; const { hearing_data: data } = comment; diff --git a/src/components/admin/HearingFormStep3.jsx b/src/components/admin/HearingFormStep3.jsx index dbbed7c3b..4fb1f54bc 100644 --- a/src/components/admin/HearingFormStep3.jsx +++ b/src/components/admin/HearingFormStep3.jsx @@ -218,6 +218,7 @@ const HearingFormStep3 = (props) => { circle: false, circlemarker: false, polyline: false, + rectangle: { showArea: false }, marker: { icon: new Leaflet.Icon({ iconUrl: leafletMarkerIconUrl,