Made time lesser
This commit was merged in pull request #13.
This commit is contained in:
@@ -25,7 +25,7 @@ export default function ForgotPassword() {
|
||||
|
||||
const resetHandler = async () => {
|
||||
if (email == '') {
|
||||
setMsgError('Please fill in fields')
|
||||
setMsgError('An email is required')
|
||||
} else if (!checked) {
|
||||
setMsgError('Check if you are human')
|
||||
}
|
||||
@@ -38,14 +38,14 @@ export default function ForgotPassword() {
|
||||
if (res.status === 200) {
|
||||
const { data } = res
|
||||
if (data.status == -1) {
|
||||
setMsgError('reset was not successful')
|
||||
setMsgError('This is an incorrect or duplicate email')
|
||||
setResetLoading(false)
|
||||
return
|
||||
}
|
||||
if (data.status > 0) {
|
||||
} else if (data.status > 0) {
|
||||
setResetLoading(false)
|
||||
navigate("/verify-you", { replace: true })
|
||||
console.log('Success', data)
|
||||
} else{
|
||||
setMsgError("reset was not successful")
|
||||
setResetLoading(false)
|
||||
}
|
||||
setMail("")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user