Skip to content

Commit

Permalink
Merge pull request #24513 from WikusKriek/23813-error-doesn't-clear-i…
Browse files Browse the repository at this point in the history
…mmediately

Clear validate error on refresh
  • Loading branch information
johnmlee101 authored Aug 17, 2023
2 parents ca8372f + 3f1f7a6 commit a6fa52d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ function BaseValidateCodeForm(props) {

useEffect(() => {
Session.clearAccountMessages();
if (!validateLoginError) {
return;
}
User.clearContactMethodErrors(props.contactMethod, 'validateLogin');
// contactMethod is not added as a dependency since it does not change between renders
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
Expand Down

0 comments on commit a6fa52d

Please sign in to comment.