refactor(shared): extraire QueryClient dans shared/lib/query-client.ts

This commit is contained in:
Hermann_Kitio 2026-04-17 17:42:28 +03:00
parent 7f552dcdd1
commit 94731edafc
2 changed files with 12 additions and 10 deletions

View file

@ -1,16 +1,8 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { QueryClientProvider } from '@tanstack/react-query'
import { BrowserRouter } from 'react-router-dom'
import { queryClient } from '@/shared/lib/query-client'
import { AppRouter } from './router'
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000,
retry: false,
},
},
})
export function Providers() {
return (
<QueryClientProvider client={queryClient}>

View file

@ -0,0 +1,10 @@
import { QueryClient } from '@tanstack/react-query'
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000,
retry: false,
},
},
})