fix: show night icons for hourly forecast
All checks were successful
CI / Lint, typecheck and build (push) Successful in 10m2s

This commit is contained in:
zv
2026-06-13 21:27:41 +02:00
parent 83c0657296
commit 5a8e39dbe2
4 changed files with 58 additions and 35 deletions

View File

@@ -14,6 +14,7 @@ import {
formatForecastTemperature,
formatForecastWind,
getForecastCondition,
isForecastNight,
} from "@/lib/forecast-utils";
import { useWeatherStore } from "@/lib/store";
import type { DailyForecast, ForecastSource, HourlyForecast } from "@/types/forecast";
@@ -156,7 +157,7 @@ export function DayForecastModal({
title={getForecastCondition(hour.weatherCode, language)}
>
<p className="text-xs font-medium text-muted">{formatHour(hour.time)}</p>
<ForecastIcon code={hour.weatherCode} className="mx-auto my-3 size-6 text-accent" />
<ForecastIcon code={hour.weatherCode} isNight={isForecastNight(hour.time, day)} className="mx-auto my-3 size-6 text-accent" />
<p className="text-lg font-semibold tracking-tight">{formatForecastTemperature(hour.temperature, language, temperatureUnit)}</p>
<p className="mt-2 flex items-center justify-center gap-1 text-[0.66rem] text-accent">
<Droplets className="size-3" />