mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(react-query): set react-query networkMode to offlineFirst EE-7081 (#11812)
This commit is contained in:
parent
db8f9c6f6c
commit
2669a44d79
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ function mergeOptions<T>(options: T[]) {
|
||||||
|
|
||||||
export function createQueryClient() {
|
export function createQueryClient() {
|
||||||
return new QueryClient({
|
return new QueryClient({
|
||||||
|
defaultOptions: {
|
||||||
|
queries: {
|
||||||
|
networkMode: 'offlineFirst',
|
||||||
|
},
|
||||||
|
},
|
||||||
mutationCache: new MutationCache({
|
mutationCache: new MutationCache({
|
||||||
onError: (error, variable, context, mutation) => {
|
onError: (error, variable, context, mutation) => {
|
||||||
handleError(error, mutation.meta?.error);
|
handleError(error, mutation.meta?.error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue