added other stages
This commit is contained in:
@@ -20,11 +20,10 @@ export default function ForgotPassword() {
|
||||
function validationChecker(email) {
|
||||
const emailCheck = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
|
||||
if (email === "") {
|
||||
setValidation("email is required");
|
||||
setValidation("");
|
||||
} else if (!email.match(emailCheck)) {
|
||||
setValidation('Please input a valid email address');
|
||||
} else {
|
||||
setValidation("");
|
||||
setButtonDisabled(false)
|
||||
}
|
||||
}
|
||||
@@ -36,6 +35,10 @@ export default function ForgotPassword() {
|
||||
}
|
||||
const reset = await user.resetPassword(resetEmail);
|
||||
setLoading(true)
|
||||
|
||||
const {raw_data, uuid} = reset.data
|
||||
localStorage.setItem('reset_uuid', uuid)
|
||||
localStorage.setItem('reset_raw', JSON.stringify(raw_data))
|
||||
if (reset.status == 200){
|
||||
setTimeout(() => {
|
||||
navigate("/verify-you", {replace : true});
|
||||
|
||||
Reference in New Issue
Block a user