Skip to content

Commit

Permalink
Refactor image url paths for updateHourly
Browse files Browse the repository at this point in the history
  • Loading branch information
Van-Nice committed Jun 20, 2024
1 parent 13b69d7 commit 76aa502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/updateHourly.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function updateHourly(weatherData, weatherCodeToImageMap) {
hourlyHTML += `
<div class="scroll-hour title-text-setrise">
<h2 class="title-text">${new Date(currentSetRiseUnix * 1000).toLocaleTimeString('en-US', riseSetOptions)}</h2>
<img src="${(riseSet.length%2 === 0) ? "/client/public/weather-day/sun-day.png" : "/client/public/weather-night/clear-night.png"}" alt="Weather icon">
<img src="${(riseSet.length%2 === 0) ? "../public/weather-day/sun-day.png" : "../public/weather-night/clear-night.png"}" alt="Weather icon">
<p>${(riseSet.length%2 === 0) ? "Sunrise" : "Sunset"}</p>
</div>
`;
Expand Down

0 comments on commit 76aa502

Please sign in to comment.