Skip to content

Amethyst Abby Goodman & Winslow Edwards#67

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

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

Conversation

@WinsEdwards

Copy link
Copy Markdown

No description provided.

@ameerrah9 ameerrah9 left a comment

Copy link
Copy Markdown

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 thread src/index.js
Comment on lines +1 to +6
state = {
temp: 50,
city: "Atlanta",
latitude: 0,
longitude: 0
};

Copy link
Copy Markdown

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!

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

Copy link
Copy Markdown

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 thread src/index.js
Comment on lines +24 to +25
colorChanging();
changeGround();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Smart approach!

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏾

Comment thread src/index.js
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){

Copy link
Copy Markdown

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

Comment thread src/index.js
}
}

const colorChanging = function () {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🥳

Comment thread src/index.js
}

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

Copy link
Copy Markdown

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

Comment thread src/index.js
};

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

@ameerrah9 ameerrah9 Jun 26, 2023

Copy link
Copy Markdown

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 thread src/index.js
Comment on lines +142 to +145
const getRealTimeTemp = function (){
findLatitudeAndLongitude();
colorChanging();
changeGround();

Copy link
Copy Markdown

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!

Comment thread src/index.js
colorChanging();
}

const newSKySelect = function () {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prefer newSkySelect here

Comment thread src/index.js
// colorChangeEffect.addEventListener("click", colorChangeEffect)
};

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

Copy link
Copy Markdown

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