From 5049d81bd6c89e1800c1c4b4ecae18342628a681 Mon Sep 17 00:00:00 2001 From: zv Date: Sun, 14 Jun 2026 17:23:18 +0200 Subject: [PATCH] fix: remove duplicate weather condition badge --- components/weather/weather-hero.tsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/components/weather/weather-hero.tsx b/components/weather/weather-hero.tsx index 8e48563..dad0d91 100644 --- a/components/weather/weather-hero.tsx +++ b/components/weather/weather-hero.tsx @@ -14,7 +14,7 @@ import { getWeatherDescription, getWeatherMoodFromData, } from "@/lib/weather-utils"; -import type { SynopStation, WeatherMood } from "@/types/imgw"; +import type { SynopStation } from "@/types/imgw"; import type { ImgwCurrentWeather } from "@/types/imgw-current"; import { WeatherIcon } from "@/components/weather/weather-icon"; import { WeatherEffects } from "@/components/weather/weather-effects"; @@ -23,17 +23,6 @@ import { useWeatherStore } from "@/lib/store"; type DevWeatherEffectOverride = "rain" | "thunderstorm" | "none"; -function moodAccentClass(mood: WeatherMood) { - return { - warm: "border-accent/25 bg-accent/10 text-accent", - cloudy: "border-border/70 bg-surface-muted text-muted", - wind: "border-border/70 bg-surface-muted text-muted", - cold: "border-border/70 bg-surface-muted text-muted", - night: "border-border/70 bg-surface-muted text-muted", - mild: "border-accent/25 bg-accent/10 text-accent", - }[mood]; -} - function readDevWeatherEffectOverride(): DevWeatherEffectOverride | null { if (process.env.NODE_ENV !== "development" || typeof window === "undefined") return null; const effect = new URLSearchParams(window.location.search).get("effect"); @@ -63,7 +52,6 @@ export function WeatherHero({ station, currentWeather, currentWeatherLoading = f rainfall: currentWeather.precipitation10m ?? station.rainfall, } : station; const mood = getWeatherMoodFromData(displayedStation); - const moodAccent = moodAccentClass(mood); const feelsLike = currentWeather?.feelsLike ?? calculateFeelsLike(displayedStation.temperature, displayedStation.humidity, displayedStation.windSpeed); const metrics = [ { icon: Droplets, label: t("weather.humidity"), value: formatHumidity(displayedStation.humidity, language) }, @@ -110,9 +98,6 @@ export function WeatherHero({ station, currentWeather, currentWeatherLoading = f
{displayedLocationName} - - {weatherDescription} -

{currentWeatherLoading