I used an "IF" statement to display dynamic text - if it's null, show something, otherwise show something else. However, I am getting a blank result. What did I do wrong?
<View style={styles.rightContainer}>
{ () =>{
if(this.state.sicafSource.IdStatusManutencao == null){
return(
<View style={[{paddingHorizontal:10, marginTop:5,borderRadius:5},this.ReturnColor("Not found in API","ACTIVE")]}>
<Text style={[{ textAlign: 'right' }, styles.swipeCardRightTextS]}>
No information available
</Text>
</View>
);
}
else{
return(
<View style={[{paddingHorizontal:10, marginTop:5,borderRadius:5},this.ReturnColor("Not found in API","ACTIVE")]}>
<Text style={[{ textAlign: 'right' }, styles.swipeCardRightTextS]}>
API response is true
</Text>
</View>
);
}
}
}
</View>