Skip to content

Commit

Permalink
fix: fixed duplicate event firing on post SSO login registration (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayesha-waris authored Nov 27, 2024
1 parent 7339aec commit cd20039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/login/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ const LoginPage = (props) => {
webElementText: ELEMENT_TEXT.SIGN_IN,
webElementName: ELEMENT_NAME.SIGN_IN,
};
dispatch(setCohesionEventStates(eventData));
if (currentProvider) {
dispatch(setCohesionEventStates(eventData));
}

if (showResetPasswordSuccessBanner) {
props.dismissPasswordResetBanner();
}
Expand Down
4 changes: 3 additions & 1 deletion src/register/RegistrationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ const RegistrationPage = (props) => {
webElementText: ELEMENT_TEXT.CREATE_ACCOUNT,
webElementName: ELEMENT_NAME.CREATE_ACCOUNT,
};
dispatch(setCohesionEventStates(eventData));
if (currentProvider) {
dispatch(setCohesionEventStates(eventData));
}
registerUser();
};

Expand Down

0 comments on commit cd20039

Please sign in to comment.