From 405b6dc68c6e78aab2c98aaf7c4a0c63672da69c Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Mon, 6 Dec 2021 11:09:21 +1300 Subject: [PATCH] Fix bug where user can proceed without selecting an image varition (when multiple) --- frontend/src/components/steps/habitat/HabitatSelector.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/components/steps/habitat/HabitatSelector.js b/frontend/src/components/steps/habitat/HabitatSelector.js index 1f308ca..c1abd1a 100644 --- a/frontend/src/components/steps/habitat/HabitatSelector.js +++ b/frontend/src/components/steps/habitat/HabitatSelector.js @@ -66,6 +66,8 @@ export default function HabitatSelector(props) { setSelectedHabitat(habitatObject) if (habitatObject.images.length === 1) { setHabitatImage(habitatObject.images[0].id) + } else { + props.setNextDisabled(true); } // Update the filters for the selected habitat