Skip to content

Commit

Permalink
fix/check-user-exist-API-response-changes
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Jan 3, 2025
1 parent cf8afab commit 6d572da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/Authentication/SignUpUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,21 @@ const SignUpUser = () => {
const { data } = userRsp as AxiosResponse
setLoading(false)
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
if (data?.data?.isRegistrationCompleted === false && data.data.isEmailVerified === false) {
setEmail(values?.email)
await VerifyMail(values?.email)
if (data.data.isEmailVerified === true && data?.data?.isRegistrationCompleted === true) {
setErrMsg(data?.data?.message)
}
else if (data.data.isEmailVerified === true && data?.data?.isRegistrationCompleted !== true) {
setEmail(values?.email)
await setToLocalStorage(storageKeys.USER_EMAIL, values?.email)
setNextFlag(true)
setEnableName(true)
}
} else {
setErrMsg(userRsp as string)
}
else if (data?.data?.isRegistrationCompleted === false && data.data.isEmailVerified === false) {
setEmail(values?.email)
await VerifyMail(values?.email)
}

}
}

const redirectLandingPage = () => {
Expand Down

0 comments on commit 6d572da

Please sign in to comment.