Set next active only when location is selected

This commit is contained in:
Dana Lambert 2021-10-19 09:03:42 +13:00
parent 5bef4efe36
commit ef3d0e4d7e
3 changed files with 10 additions and 5 deletions

View file

@ -13,7 +13,7 @@ export default function LocationStep(props) {
)
const locationSelectionPanel = (
<LocationSelectorMap updateFilterState={props.updateFilterState} />
<LocationSelectorMap {...props} />
)
return (

View file

@ -13,7 +13,8 @@ function LocationMarker(props) {
click(e) {
const newPosition = e.latlng;
setPosition(newPosition);
props.updateCoordinateFilter({"latitude": newPosition.lat, "longitude": newPosition.lng});
props.updateFilterState({"latitude": newPosition.lat, "longitude": newPosition.lng});
props.setNextDisabled(false);
},
})
@ -41,7 +42,7 @@ export default function Map(props) {
attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<LocationMarker updateCoordinateFilter={props.updateFilterState} />
<LocationMarker {...props} />
<FitNewZealandBounds />
</MapContainer>
</div>