feat: build production-ready wtr weather PWA

This commit is contained in:
zv
2026-06-01 18:43:56 +02:00
commit 840555f4f5
60 changed files with 9052 additions and 0 deletions

15
hooks/use-warnings.ts Normal file
View File

@@ -0,0 +1,15 @@
"use client";
import { useQuery } from "@tanstack/react-query";
import { fetchWarnings } from "@/lib/imgw-api";
import { QUERY_GC_TIME, QUERY_STALE_TIME } from "@/lib/constants";
export function useWarnings() {
return useQuery({
queryKey: ["warnings"],
queryFn: ({ signal }) => fetchWarnings(signal),
staleTime: QUERY_STALE_TIME,
gcTime: QUERY_GC_TIME,
retry: 2,
});
}