diff --git a/src/components/Dashboard/Views/DashboardView.tsx b/src/components/Dashboard/Views/DashboardView.tsx index 194098857..202232e45 100644 --- a/src/components/Dashboard/Views/DashboardView.tsx +++ b/src/components/Dashboard/Views/DashboardView.tsx @@ -60,7 +60,7 @@ const usePrepareGridstack = () => { }, [width]); return { - isReady: !!mainAreaWidth, + isReady: Boolean(mainAreaWidth), mainAreaRef, }; }; diff --git a/src/hooks/widgets/dashDot/api.ts b/src/hooks/widgets/dashDot/api.ts index eafb8b25c..36c82a55e 100644 --- a/src/hooks/widgets/dashDot/api.ts +++ b/src/hooks/widgets/dashDot/api.ts @@ -29,7 +29,7 @@ export const useGetUsenetInfo = (params: UsenetInfoRequestParams) => refetchInterval: POLLING_INTERVAL, keepPreviousData: true, retry: 2, - enabled: !!params.appId, + enabled: Boolean(params.appId), } ); diff --git a/src/widgets/weather/useWeatherForCity.ts b/src/widgets/weather/useWeatherForCity.ts index 3f21ebad6..be7a28ac0 100644 --- a/src/widgets/weather/useWeatherForCity.ts +++ b/src/widgets/weather/useWeatherForCity.ts @@ -20,7 +20,7 @@ export const useWeatherForCity = (cityName: string) => { const weatherQuery = useQuery({ queryKey: ['weather', { cityName }], queryFn: () => fetchWeather(city?.results[0]), - enabled: !!city, + enabled: Boolean(city), cacheTime: 1000 * 60 * 60 * 6, // the weather is cached for 6 hours staleTime: 1000 * 60 * 5, // the weather is considered stale after 5 minutes });