From d512ae7e229a549a7b2cefcc10a73a62933517ec Mon Sep 17 00:00:00 2001 From: Yossi Hillali Date: Sat, 23 Mar 2024 17:17:23 +0200 Subject: [PATCH] fix: weather widget does not refresh automatically (#1981) --- src/widgets/weather/WeatherTile.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widgets/weather/WeatherTile.tsx b/src/widgets/weather/WeatherTile.tsx index 91b8311a9..2adf2d172 100644 --- a/src/widgets/weather/WeatherTile.tsx +++ b/src/widgets/weather/WeatherTile.tsx @@ -63,7 +63,11 @@ interface WeatherTileProps { } function WeatherTile({ widget }: WeatherTileProps) { - const { data: weather, isLoading, isError } = api.weather.at.useQuery(widget.properties.location); + const { + data: weather, + isLoading, + isError, + } = api.weather.at.useQuery(widget.properties.location, { refetchInterval: 1000 * 60 * 30 }); const { width, ref } = useElementSize(); const { t } = useTranslation('modules/weather');