Relative Content

Tag Archive for conditional-statements

can i handle api condition based in react?

` 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)

The conditional is supposed to allow you to go forward within the app on certain months

When you click on certain months and click the go button It’s supposed to let you continue on with the app while months That aren’t applicable, should take you to a different screen. I’ve tried my conditional with the true statement and the false statement separately. However, when I put them together. Either one of them work or neither.