Skip to content

Commit

Permalink
resolve comments on pull request
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
  • Loading branch information
pranalidhanavade committed Jan 3, 2025
1 parent d5631ac commit 6d97b8c
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/components/Authentication/#User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,26 @@ const #User = () => {
setLoading(false)
const { isEmailVerified, isRegistrationCompleted } = data?.data;
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
if (isEmailVerified && isRegistrationCompleted) {
setErrMsg(data?.data?.message)
}
else if (isEmailVerified && !isRegistrationCompleted) {
setEmail(values?.email)
await setToLocalStorage(storageKeys.USER_EMAIL, values?.email)
setNextFlag(true)
setEnableName(true)

if (isEmailVerified){
if(isRegistrationCompleted){
setErrMsg(data?.data?.message)
}
else {
setEmail(values?.email)
await setToLocalStorage(storageKeys.USER_EMAIL, values?.email)
setNextFlag(true)
setEnableName(true)
}
}
else if (!isRegistrationCompleted && !isEmailVerified) {
setEmail(values?.email)
await VerifyMail(values?.email)
else {
setEmail(values?.email)
await VerifyMail(values?.email)
}

}
else {
setErrMsg(data?.data?.message)
}
}

const redirectLandingPage = () => {
Expand Down

0 comments on commit 6d97b8c

Please # to comment.