fix: weather widget does not refresh automatically (#1981)

This commit is contained in:
Yossi Hillali
2024-03-23 17:17:23 +02:00
committed by GitHub
parent 11eaf9eb8e
commit d512ae7e22

View File

@@ -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');