Reset Page Completed

This commit is contained in:
Ebube
2023-05-05 01:21:55 +01:00
parent 12e940d9b3
commit dd94177a95
5 changed files with 230 additions and 131 deletions
@@ -30,10 +30,6 @@ export default function VerifyLink() {
// if verification is okay. set a complete signup form
const completeSignup = async () => {
if (email === "" && password === "") {
setMsgError("Please fill in fields");
}
try {
if (email !== "" && password !== "") {
setLinkLoader(true);
@@ -45,7 +41,7 @@ export default function VerifyLink() {
verify_link: token,
action: 11012,
};
const res = await userApi.CompleteSignUp(postData);
const res = await userApi?.CompleteSignUp(postData);
if (res.status === 200) {
const { data } = res;
@@ -67,13 +63,15 @@ export default function VerifyLink() {
}
} else {
setLinkLoader(false);
setLinkSuccess(false)
setLinkSuccess(false);
setMsgError("An error occurred");
}
} else {
setMsgError("Please fill in fields");
}
} catch (error) {
setLinkLoader(false);
setLinkSuccess(false)
setLinkSuccess(false);
throw new Error(error);
} finally {
setTimeout(() => {