From 9cbb1cde122bd64d5b5dd8d56487c5aba2fd7e55 Mon Sep 17 00:00:00 2001 From: janrembold Date: Mon, 22 Apr 2024 15:43:33 +0200 Subject: [PATCH] fix: disable next button if no agency was found --- .../registration/agencySelection/AgencySelectionResults.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx b/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx index 5c3b43f11..b0d28130c 100644 --- a/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx +++ b/src/extensions/components/registration/agencySelection/AgencySelectionResults.tsx @@ -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);