mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
- Replaced the useDocuments hook with React Query for better caching and deduplication of document requests. - Updated the ConnectorIndicator component to fetch document type counts using a new atom for real-time updates. - Enhanced the useComments hook to manage batch requests more effectively, reducing race conditions and improving performance. - Set default query options in the query client to optimize stale time and refetch behavior.
10 lines
198 B
TypeScript
10 lines
198 B
TypeScript
import { QueryClient } from "@tanstack/react-query";
|
|
|
|
export const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 30_000,
|
|
refetchOnWindowFocus: false,
|
|
},
|
|
},
|
|
});
|