Skip to content

Commit

Permalink
chore: set tanstack query settings globaly
Browse files Browse the repository at this point in the history
  • Loading branch information
issambaccouch committed Nov 15, 2023
1 parent 4da7695 commit 7b4d27a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion JeMPI_Apps/JeMPI_UI/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import ScrollBackButtons from 'components/shared/ScrollBackButtons'

const queryClient = new QueryClient({
defaultOptions: {
queries: {}
queries: {
staleTime: 5 * (60 * 1000),
cacheTime: 10 * (60 * 1000)
}
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ const NotificationWorklist = () => {
selectedStates
),
refetchOnWindowFocus: false,
cacheTime: 1000 * 60 * 10,
keepPreviousData: true,
staleTime: 1000 * 60 * 10
keepPreviousData: true
})

const onFilterChange = useCallback((filterModel: GridFilterModel) => {
Expand Down

0 comments on commit 7b4d27a

Please sign in to comment.