Fixes the incorrect error message while resetting password (#948)

This commit is contained in:
Santosh Bhandari 2021-10-08 13:46:00 +05:45 committed by GitHub
parent 1561884fad
commit dcbc594e59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,6 @@ class ForgotPassword extends React.Component {
};
handleClick = (event) => {
this.setState({ buttonClicked: true });
event.preventDefault();
fetch(`${config.apiUrl}/forgot_password`, {
@ -38,6 +37,7 @@ class ForgotPassword extends React.Component {
this.setState({ isEmailFound: true });
return res.json();
} else {
this.setState({ buttonClicked: true });
this.setState({ isEmailFound: false });
}
})