Skip to content
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

Merged
merged 2 commits into from
Sep 29, 2022
Merged

Conversation

lindakw
Copy link
Owner

@lindakw lindakw commented Sep 29, 2022

Added a widgets folder and two switch case files for the Aqi Level and Aqi Text info/advice.

@lindakw lindakw linked an issue Sep 29, 2022 that may be closed by this pull request
Copy link
Collaborator

@Kacique Kacique left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Collaborator

@kmausolf kmausolf left a 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!

Comment on lines +19 to +20
"react": "18.0.0",
"react-native": "0.69.6",
Copy link
Collaborator

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?

Copy link
Owner Author

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.

Comment on lines +5 to +19
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>
Copy link
Collaborator

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!

@lindakw lindakw merged commit 0835308 into development Sep 29, 2022
@lindakw lindakw deleted the 24-suggestion-component-widget branch September 29, 2022 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion Component Widget
3 participants