Reset Page Completed
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user