altricade_portofolio/src/lib/query-client.ts
Заид Омар Медхат | Zaid Omar Medhat fab8983d5c
Some checks failed
Deploy / deploy (push) Failing after 5m27s
init
2026-07-09 12:21:21 +05:00

18 lines
415 B
TypeScript

import { QueryClient } from '@tanstack/react-query'
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 5,
retry: (failureCount, error) => {
if (error instanceof Error && error.message === 'Session expired') {
return false
}
return failureCount < 3
},
},
mutations: {
retry: false,
},
},
})