mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
Merge pull request #783 from ajnart/deepsource-autofix-1247c7e2
Replace short hand type conversions with function calls
This commit is contained in:
@@ -60,7 +60,7 @@ const usePrepareGridstack = () => {
|
||||
}, [width]);
|
||||
|
||||
return {
|
||||
isReady: !!mainAreaWidth,
|
||||
isReady: Boolean(mainAreaWidth),
|
||||
mainAreaRef,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useGetUsenetInfo = (params: UsenetInfoRequestParams) =>
|
||||
refetchInterval: POLLING_INTERVAL,
|
||||
keepPreviousData: true,
|
||||
retry: 2,
|
||||
enabled: !!params.appId,
|
||||
enabled: Boolean(params.appId),
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user