Merge pull request #783 from ajnart/deepsource-autofix-1247c7e2

Replace short hand type conversions with function calls
This commit is contained in:
Thomas Camlong authored and GitHub committed 2023-04-01 08:15:37 +09:00
commit 5a41de0eb9
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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
});