Skip to content

Amethyst Abby Goodman & Winslow Edwards#67

Open
WinsEdwards wants to merge 31 commits intoAda-C19:mainfrom
WinsEdwards:main
Open

Amethyst Abby Goodman & Winslow Edwards#67
WinsEdwards wants to merge 31 commits intoAda-C19:mainfrom
WinsEdwards:main

Conversation

@WinsEdwards
Copy link

No description provided.

Copy link

@ameerrah9 ameerrah9 left a comment

Choose a reason for hiding this comment

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

Great work, Abby + Winslow! 🥳

Thank you for your patience as we catch up on grading. Nice work! The HTML is structured well and the JS is clear and well-factored. This project is a Green. 🟢

Keep it up!

Comment on lines +1 to +6
state = {
temp: 50,
city: "Atlanta",
latitude: 0,
longitude: 0
};

Choose a reason for hiding this comment

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

Great job setting up state!

.then((response) => {
let tempK = response.data.main.temp
state.temp = Math.round(((tempK-273.15)*1.8) + 32)
console.log(response.data.main.temp)

Choose a reason for hiding this comment

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

Remember to remove debugging log statements

Comment on lines +24 to +25
colorChanging();
changeGround();

Choose a reason for hiding this comment

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

Smart approach!

Comment on lines +43 to +44
state.latitude = response.data[0].lat;
state.longitude = response.data[0].lon;

Choose a reason for hiding this comment

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

👍🏾

Comment on lines +57 to +70
const changeGround = function () {
if (state.temp <= 39) {
document.querySelector("#currentTemp")
const tempGroundContainer = document.querySelector("#groundChange")
tempGroundContainer.textContent = `❄️🌲❄️☃️❄️🏂❄️🌲❄️`
}

else if (state.temp >= 40 && state.temp <= 59) {
document.querySelector("#currentTemp")
const tempGroundContainer = document.querySelector("#groundChange")
tempGroundContainer.textContent = `🌬️ 🍂 🦃 🌾 🍂 🌰 🐿️ 🌾 🍂`
}

else if (state.temp >= 60 && state.temp <= 69){

Choose a reason for hiding this comment

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

Great function naming, this looks really clean 💯 Your conditonal comprehension is very strong

}
}

const colorChanging = function () {

Choose a reason for hiding this comment

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

🥳

}

const incrementTemp = function() {
state.temp +=1;

Choose a reason for hiding this comment

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

Prefer state.temp += 1 here for reada😄bility

};

const decrementTemp = function() {
state.temp -=1
Copy link

@ameerrah9 ameerrah9 Jun 26, 2023

Choose a reason for hiding this comment

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

Prefer state.temp -= 1 here for readability

Comment on lines +142 to +145
const getRealTimeTemp = function (){
findLatitudeAndLongitude();
colorChanging();
changeGround();

Choose a reason for hiding this comment

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

Nice way to reuse these functions!

colorChanging();
}

const newSKySelect = function () {

Choose a reason for hiding this comment

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

Prefer newSkySelect here

// colorChangeEffect.addEventListener("click", colorChangeEffect)
};

document.addEventListener("DOMContentLoaded", registerEventHandlers); No newline at end of file

Choose a reason for hiding this comment

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

🥳🎉

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.

3 participants