initial setup

This commit is contained in:
Jurgis Sakalauskas
2025-10-11 17:21:39 +03:00
commit ad2cf25bfd
37 changed files with 7084 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { QueryClient } from '@tanstack/react-query';
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
retry: 1
}
}
});
+14
View File
@@ -0,0 +1,14 @@
import { useQuery } from '@tanstack/react-query';
import { getHealth, type HealthResponse } from '../api/health';
const healthQueryKeys = {
all: ['health'] as const
};
export function useHealthQuery() {
return useQuery<HealthResponse>({
queryKey: healthQueryKeys.all,
queryFn: getHealth,
staleTime: 30_000
});
}