Basically, I have login api and nested then function is there, my question is how I stop from calling as certain condition, pasting my code:
login(values.email, values.password)
.then((res) => {
if (res?.value?.data?.unverified) {
console.log('>>> in', res, RESEND_VERIFICATION_EMAIL_DIALOG);
} else getMe(true);
})
.then(() => ...)
So, if it comes in the above if I have to stop calling nested then and all code. Any help would be appreciated, thanks in advance :).