From f9b3020d3e8882d89872e59e1ab214730dc6037d Mon Sep 17 00:00:00 2001 From: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:42:01 +0400 Subject: [PATCH] CORE-4518: new user fix (#1081) (#1082) --- design-v2/benefits/benefitsForm.jsx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/design-v2/benefits/benefitsForm.jsx b/design-v2/benefits/benefitsForm.jsx index d6d51aa1..693371dc 100644 --- a/design-v2/benefits/benefitsForm.jsx +++ b/design-v2/benefits/benefitsForm.jsx @@ -82,8 +82,8 @@ const BenefitsForm = React.forwardRef(({ onSubmit, setModalActive }, ref) => { useEffect(() => { if ( (dataProvidersResponse.error && - dataProvidersResponse.error.length > 1 && - dataProvidersResponse.existingDataProviders && + dataProvidersResponse.error.length >= 1 && + !dataProvidersResponse.existingDataProviders && dataProvidersResponse.existingDataProviders.length === 0) || dataProvidersResponse?.error?.status === 500 ) { @@ -99,18 +99,18 @@ const BenefitsForm = React.forwardRef(({ onSubmit, setModalActive }, ref) => { ) } else if ( (dataProvidersResponse.existingDataProviders && - dataProvidersResponse.existingDataProviders.length > 1) || + dataProvidersResponse.existingDataProviders.length >= 1) || dataProvidersResponse?.error?.status === 409 ) { setFormSubmitted(true) setModalContent(
+ }) page on the CORE website.

**Please note**, that if you have submitted this repository recently it may not appear on the search results. Please wait until harvesting will be completed. [Find out more](documentation/data-providers-guide#indexing). `} setModalContent={setModalContent} @@ -118,12 +118,7 @@ const BenefitsForm = React.forwardRef(({ onSubmit, setModalActive }, ref) => { onCloseModal={onCloseModal} /> ) - } else if ( - (dataProvidersResponse.error && - dataProvidersResponse.error.length === 0) || - (dataProvidersResponse.length >= 1 && - !dataProvidersResponse?.error?.status) - ) { + } else if (dataProvidersResponse.id) { setFormSubmitted(true) setModalContent( { /> ) } - }, [dataProvidersResponse, dataProvidersResponse?.error?.status]) + }, [ + dataProvidersResponse?.id, + dataProvidersResponse?.existingDataProviders, + dataProvidersResponse?.error?.status, + ]) return ( <>