diff --git a/frontend/src/components/Stepper.js b/frontend/src/components/Stepper.js index 51b6278..6d42c9f 100644 --- a/frontend/src/components/Stepper.js +++ b/frontend/src/components/Stepper.js @@ -20,17 +20,21 @@ const steps = [ export default function StepperWizard(props) { const [activeStep, setActiveStep] = React.useState(0); + const [nextDisabled, setNextDisabled] = React.useState(true); const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); + setNextDisabled(true); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); + setNextDisabled(true); }; const handleReset = () => { setActiveStep(0); + setNextDisabled(true); }; let CurrentStep = activeStep >= steps.length ? steps[steps.length-1].component : steps[activeStep].component; @@ -56,7 +60,7 @@ export default function StepperWizard(props) { ) : ( - + diff --git a/frontend/src/components/steps/location/Location.js b/frontend/src/components/steps/location/Location.js index 6f5dc30..a5329b0 100644 --- a/frontend/src/components/steps/location/Location.js +++ b/frontend/src/components/steps/location/Location.js @@ -13,7 +13,7 @@ export default function LocationStep(props) { ) const locationSelectionPanel = ( - + ) return ( diff --git a/frontend/src/components/steps/location/Map.js b/frontend/src/components/steps/location/Map.js index d9f9025..4ec77cd 100644 --- a/frontend/src/components/steps/location/Map.js +++ b/frontend/src/components/steps/location/Map.js @@ -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='© OpenStreetMap contributors' url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" /> - +