style: finish frontend token cleanup
This commit is contained in:
@@ -12,14 +12,24 @@ import {
|
||||
formatWind,
|
||||
getWeatherDescription,
|
||||
getWeatherMoodFromData,
|
||||
moodAccentClass,
|
||||
} from "@/lib/weather-utils";
|
||||
import type { SynopStation } from "@/types/imgw";
|
||||
import type { SynopStation, WeatherMood } from "@/types/imgw";
|
||||
import type { ImgwCurrentWeather } from "@/types/imgw-current";
|
||||
import { WeatherIcon } from "@/components/weather/weather-icon";
|
||||
import { WeatherEffects } from "@/components/weather/weather-effects";
|
||||
import { useI18n } from "@/lib/i18n";
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
export function WeatherHero({ station, currentWeather, currentWeatherLoading = false, locationName, distanceKm }: { station: SynopStation; currentWeather?: ImgwCurrentWeather | null; currentWeatherLoading?: boolean; locationName?: string; distanceKm?: number }) {
|
||||
const { language, t } = useI18n();
|
||||
const displayedLocationName = locationName ?? station.name;
|
||||
|
||||
Reference in New Issue
Block a user