File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,15 @@ const RegistrationPage = (props) => {
144144 ) ;
145145
146146 useEffect ( ( ) => {
147- if ( isValidatingSimplifiedRegisterFirstPage && backendValidations
148- && Object . values ( backendValidations ) . every ( value => value === '' )
149- ) {
150- trackSimplifyRegistrationValidatedSubmitBtnClicked ( simplifyRegistrationExpVariation ) ;
151- trackSimplifyRegistrationSecondStepViewed ( ) ;
152- dispatch ( setSimplifyRegExperimentData ( simplifyRegistrationExpVariation , SECOND_STEP ) ) ;
147+ if ( isValidatingSimplifiedRegisterFirstPage && backendValidations ) {
148+ if ( Object . values ( backendValidations ) . every ( value => value === '' ) ) {
149+ setErrorCode ( { type : '' , count : 0 } ) ;
150+ trackSimplifyRegistrationValidatedSubmitBtnClicked ( simplifyRegistrationExpVariation ) ;
151+ trackSimplifyRegistrationSecondStepViewed ( ) ;
152+ dispatch ( setSimplifyRegExperimentData ( simplifyRegistrationExpVariation , SECOND_STEP ) ) ;
153+ } else {
154+ setErrorCode ( prevState => ( { type : FORM_SUBMISSION_ERROR , count : prevState . count + 1 } ) ) ;
155+ }
153156 }
154157 } , [ // eslint-disable-line react-hooks/exhaustive-deps
155158 isValidatingSimplifiedRegisterFirstPage ,
You can’t perform that action at this time.
0 commit comments