-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
24 suggestion component widget #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work on the air quality level selectors!
"react": "18.0.0", | ||
"react-native": "0.69.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, was there something in 0.70.1 that was causing problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I can recall. I may not have updated to the latest version.
switch (true) { | ||
case (aqiNum <= 50): | ||
return <Text style={styles.aqiLevel}>Good</Text> | ||
case (aqiNum <= 100): | ||
return <Text style={styles.aqiLevel}>Moderate</Text> | ||
case (aqiNum <= 150): | ||
return <Text style={styles.aqiLevel}>Unhealthy for Sensitive Groups</Text> | ||
case (aqiNum <= 200): | ||
return <Text style={styles.aqiLevel}>Unhealthy</Text> | ||
case (aqiNum <= 300): | ||
return <Text style={styles.aqiLevel}>Very Unhealthy</Text> | ||
case (aqiNum >= 301): | ||
return <Text style={styles.aqiLevel}>Hazardous</Text> | ||
default: | ||
return <Text style={styles.aqiLevel}>None</Text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa. I had no idea you could match against expressions in JS. This is wild!
Added a widgets folder and two switch case files for the Aqi Level and Aqi Text info/advice.