Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fixtr committed Feb 4, 2024
1 parent 9f216ef commit 75816f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 6 additions & 2 deletions js/js/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ function onGeoOk(position) {
fetch(url)
.then((response) => response.json())
.then((data) => {
city.innerText = data.name;
weather.innerText = `${data.weather[0].main} / ${data.main.temp}`;
const weather = document.querySelector("#weather span:first-child");
const temp = weather.nextElementSibling;
const city = document.querySelector("#weather span:last-child");
weather.innerText = data.name;
temp.innerText = `${data.main.temp}도`;
city.innerText = data.weather[0].main;
});
}
function onGeoError() {
Expand Down

0 comments on commit 75816f5

Please sign in to comment.