-
Notifications
You must be signed in to change notification settings - Fork 527
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
Sharks- Chinazo Onwukaike #14
base: main
Are you sure you want to change the base?
Conversation
complete wave 01, design and html
Completes wave 02. Changes pics and temp color dynamically
complete wave 03
complete wave 04. add F/C toggle
completes wave 05
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.
Wow! Very organized and easy to read, Chinazo! Only thing I can think of for you to consider is how can we dry up these functions that are a long list of if statements and re-assigning state variables (like changetempColor
on line 24)?
Something we could do is fatten up state with all of these values that correlate to the sky or the temperature. For example:
const state = {
stats: [
{ upperBound: 49, color: "teal", ground: "🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲"},
{ upperBound: 60, color: "yellow", ground: "🌾🌾_🍃_🪨__🛤_🌾🌾🌾_🍃"}
]
}
Now we can iterate through our hard coded values that correlate to the right temp or sky. That's really all I saw that could be dried up! Nicely done!
|
||
// Change city name by input box | ||
const changeCity = (e) => { | ||
// const searchCity = document.getElementById('search-box'); |
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.
since you aren't using this, let's get rid of it for the final submission!
// const searchCity = document.getElementById('search-box'); |
No description provided.