Skip to content

Commit

Permalink
fix: disable next button if no agency was found
Browse files Browse the repository at this point in the history
  • Loading branch information
janrembold committed Apr 22, 2024
1 parent e689b86 commit 9cbb1cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export const AgencySelectionResults = ({
setDisabledNextButton(false);
onChange({ agency: selectedAgency });
}

if (results?.length === 0) {
setDisabledNextButton(true);
}
}, [selectedAgency, results, onChange, setDisabledNextButton, zipcode]);

const onlyExternalAgencies = results?.every((agency) => agency.external);
Expand Down

0 comments on commit 9cbb1cd

Please sign in to comment.