` try {
let response = data?.is_signup ? await apiRequest.Auth.sendLoginOtp(data) : await apiRequest.Auth.login(data);
// let response = await apiRequest.Auth.sendLoginOtp(data);
// const response = await apiRequest.Auth.sendLoginOtp(data);
console.log(“response73”,response)
console.log(“response73==data1”,response.data.accessToken)
if (response) {
console.log("response73==data2",response.data.accessToken)
await setValue('AccessToken', response?.data);
setIsSignedIn(true)
console.log("is_sinup?.Signup",is_sinup?.Signup);
if (is_sinup?.Signup === 'IntrestNotCompleted') {
push('Interest')
} else {
// push('Interest')
}
setIsLoading(false);
} else {
setIsLoading(false);
console.error('Otp error', response);
}
} catch (error: any) {
setIsLoading(false);
showToast(
<Text style={{ color: 'red' }}>{'Please Provide Valid OTP'}</Text>,
);
}`
let response = data?.is_signup ? await apiRequest.Auth.sendLoginOtp(data) : await apiRequest.Auth.login(data);
can i use lilke this
Dgs Mohan V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.