Skip to content

Commit

Permalink
fix: fix error banner alert (openedx#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
syedsajjadkazmii authored Feb 29, 2024
1 parent 80435d3 commit 8aeacaa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/register/RegistrationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@ const RegistrationPage = (props) => {
);

useEffect(() => {
if (isValidatingSimplifiedRegisterFirstPage && backendValidations
&& Object.values(backendValidations).every(value => value === '')
) {
trackSimplifyRegistrationValidatedSubmitBtnClicked(simplifyRegistrationExpVariation);
trackSimplifyRegistrationSecondStepViewed();
dispatch(setSimplifyRegExperimentData(simplifyRegistrationExpVariation, SECOND_STEP));
if (isValidatingSimplifiedRegisterFirstPage && backendValidations) {
if (Object.values(backendValidations).every(value => value === '')) {
setErrorCode({ type: '', count: 0 });
trackSimplifyRegistrationValidatedSubmitBtnClicked(simplifyRegistrationExpVariation);
trackSimplifyRegistrationSecondStepViewed();
dispatch(setSimplifyRegExperimentData(simplifyRegistrationExpVariation, SECOND_STEP));
} else {
setErrorCode(prevState => ({ type: FORM_SUBMISSION_ERROR, count: prevState.count + 1 }));
}
}
}, [ // eslint-disable-line react-hooks/exhaustive-deps
isValidatingSimplifiedRegisterFirstPage,
Expand Down

0 comments on commit 8aeacaa

Please sign in to comment.