diff --git a/frontend/src/components/Stepper.js b/frontend/src/components/Stepper.js index 593fcc4..5830608 100644 --- a/frontend/src/components/Stepper.js +++ b/frontend/src/components/Stepper.js @@ -9,7 +9,6 @@ import LocationStep from './steps/location/LocationStep' import SoilStep from './steps/soilvariant/SoilStep' import HabitatStep from './steps/habitat/HabitatStep'; import ZoneStep from './steps/zone/ZoneStep'; -import ProjectSpecificsStep from './steps/specifics/ProjectSpecificsStep'; import SummaryStep from './steps/summary/ZoneStep'; import ResultsStep from './steps/results/ResultsStep' diff --git a/frontend/src/components/steps/habitat/HabitatSelector.js b/frontend/src/components/steps/habitat/HabitatSelector.js index eeae7c9..6137bb8 100644 --- a/frontend/src/components/steps/habitat/HabitatSelector.js +++ b/frontend/src/components/steps/habitat/HabitatSelector.js @@ -42,7 +42,7 @@ export default function HabitatSelector(props) { if (props.filters.habitat && props.filters.habitatImage) { props.setNextDisabled(false); } - }); + }, [habitats.length, props, habitatsMap]); const setHabitatImage = (imageId) => { // Sets the selected image radio, updates filter state for image and enable the next button @@ -67,7 +67,7 @@ export default function HabitatSelector(props) { } // Update the filters for the selected habitat - props.updateFilterState({ "habitat": habitatObject }); + props.updateFilterState({ "habitat": {"id": habitatObject.id, "name": habitatObject.name} }); }; const handleImageRadioChange = (event) => { @@ -79,7 +79,7 @@ export default function HabitatSelector(props) { return (
{image.name}
- +