Open
Conversation
ameerrah9
reviewed
Jan 17, 2023
Comment on lines
+74
to
+103
| <div id="temp-increase-button" class="increase-button buttons"></div> | ||
| <div id="temp-decrease-button"class="decrease-button buttons"></div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div id="dream-sky" class="dream-panels"> | ||
| <h3>Dream Sky</h3> | ||
| <div class="dream-panel-content"> | ||
| <select name="skies" id="sky-select"> | ||
| <option value=""> | ||
| Pick One | ||
| </option> | ||
| <option id="sunshine-sky" value="sunshine"> | ||
| Sunshine | ||
| </option> | ||
| <option id="cloudy-sky" value="clouds"> | ||
| Cloudy | ||
| </option> | ||
| <option id="rain-sky" value="rain"> | ||
| Rain | ||
| </option> | ||
| <option id="snow-sky" value="snow"> | ||
| Snow | ||
| </option> | ||
| </select> | ||
| </div> | ||
| </div> | ||
| <div id="dream-humidity" class="dream-panels"> | ||
| <h3>Dream Humidity</h3> | ||
| <div class="dream-panel-content"> |
ameerrah9
reviewed
Jan 17, 2023
Comment on lines
+3
to
+8
| const state = { | ||
| temp: 0, // starting temp | ||
| humidity: 0, // starting humidity | ||
| city: "Chattanooga", // default city | ||
| clicked: false, // whether the temp increase button is in clicked state | ||
| }; |
ameerrah9
reviewed
Jan 17, 2023
Comment on lines
+82
to
+84
| if (document.getElementById("search-bar").value) { | ||
| cityInput = document.getElementById("search-bar").value; | ||
| }; |
There was a problem hiding this comment.
Nice approach using this guard clause 👍🏾
ameerrah9
reviewed
Jan 17, 2023
Comment on lines
+119
to
+132
| const getFiveDayForecast = () => { | ||
| let cityInput = state.city; | ||
|
|
||
| if (document.getElementById("search-bar").value) { | ||
| cityInput = document.getElementById("search-bar").value; | ||
| }; | ||
|
|
||
| return axios.get('http://127.0.0.1:5000/location', {params: {q: cityInput} | ||
| }) | ||
| .then(location => { | ||
| return { | ||
| lat: location.data[0].lat, | ||
| lon: location.data[0].lon | ||
| } |
There was a problem hiding this comment.
Looks good! Nice work getting this second call to work and extending your project 🥳
ameerrah9
reviewed
Jan 17, 2023
Comment on lines
+250
to
+253
| // RESET CITY TO DEFAULT | ||
| const resetToDefault = () => { | ||
| window.location.reload(); | ||
| }; |
ameerrah9
reviewed
Jan 17, 2023
ameerrah9
left a comment
There was a problem hiding this comment.
Great work, Nicole! 🎉
Thank you for your patience as we catch up on grading. Your JavaScript looks really clean, your commit message are excellent, and your closing semi-colons are consistent! This project is a Green. 🟢
Keep it up! 💯
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enhancements:
i added another endpoint to the proxy server to request the five day forecast data. to refactor, instead of calling '/weather' for the default city's current weather, then calling '/forecast' for the five day forecast, i would only call '/forecast' and use the first date's data to update the default city's current weather. i kept it for the project requirement's sake.