Initial Commit

This commit is contained in:
2026-04-09 23:23:31 +02:00
commit 9c6d47c5e0
94 changed files with 15173 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { useQuery } from '@tanstack/react-query';
import { api } from '../api';
export function useWeather() {
return useQuery({
queryKey: ['weather'],
queryFn: () => api.weather.get(),
staleTime: 15 * 60_000,
refetchInterval: 15 * 60_000,
});
}
export function useForecast() {
return useQuery({
queryKey: ['forecast'],
queryFn: () => api.weather.forecast(),
staleTime: 3 * 60 * 60_000,
});
}