diff --git a/frontend/src/components/WeatherCard.vue b/frontend/src/components/WeatherCard.vue index 1fbb247..dac6b57 100644 --- a/frontend/src/components/WeatherCard.vue +++ b/frontend/src/components/WeatherCard.vue @@ -9,6 +9,8 @@ interface ForecastDay { precip_probability: number | null precip_mm: number | null windspeed_max: number + precip_summary?: string + precip_peak_hour?: string } interface WeatherData { @@ -21,6 +23,7 @@ interface WeatherData { yesterday_high: number | null yesterday_low: number | null wind_unit?: string + precip_summary?: string | null forecast: ForecastDay[] } @@ -68,6 +71,11 @@ const fetchedAtLabel = computed(() => { return '' } }) + +function hasPrecip(day: ForecastDay): boolean { + return (day.precip_probability != null && day.precip_probability > 0) || + (day.precip_mm != null && day.precip_mm > 0) +}