fix: weather widget does not refresh automatically (#1981)
This commit is contained in:
@@ -63,7 +63,11 @@ interface WeatherTileProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function WeatherTile({ widget }: 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 { width, ref } = useElementSize();
|
||||||
const { t } = useTranslation('modules/weather');
|
const { t } = useTranslation('modules/weather');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user