Form/ELT: return react-query cache settings to default

This commit is contained in:
vchikalkin 2023-08-23 13:25:44 +03:00
parent 438242ac31
commit d17ae47ba8
2 changed files with 0 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import { columns } from './lib/config';
import { makeEltKaskoRequest } from './lib/make-request';
import type { Row, StoreSelector } from './types';
import { getEltKasko } from '@/api/elt/query';
import { STALE_TIME } from '@/constants/request';
import { MAX_FRANCHISE, MAX_INSURANCE, MIN_INSURANCE } from '@/constants/values';
import helper from '@/process/elt/lib/helper';
import { useStore } from '@/stores/hooks';
@ -42,7 +41,6 @@ export const Kasko = observer(() => {
const { id, key, name } = row;
return {
cacheTime: 0,
enabled: false,
initialData: { ...initialData, id, key, name },
queryFn: async (context: QueryFunctionContext) => {
@ -60,7 +58,6 @@ export const Kasko = observer(() => {
queryKey: ['elt', 'kasko', id],
refetchOnWindowFocus: false,
retry: false,
staleTime: STALE_TIME,
};
}),
});

View File

@ -4,7 +4,6 @@ import { columns } from './lib/config';
import { makeEltOsagoRequest } from './lib/make-request';
import type { Row, StoreSelector } from './types';
import { getEltOsago } from '@/api/elt/query';
import { STALE_TIME } from '@/constants/request';
import { MAX_INSURANCE, MIN_INSURANCE } from '@/constants/values';
import helper from '@/process/elt/lib/helper';
import { useStore } from '@/stores/hooks';
@ -37,7 +36,6 @@ export const Osago = observer(() => {
const { id, key, name } = row;
return {
cacheTime: 0,
enabled: false,
initialData: { ...initialData, id, key, name },
queryFn: async (context: QueryFunctionContext) => {
@ -55,7 +53,6 @@ export const Osago = observer(() => {
queryKey: ['elt', 'osago', id],
refetchOnWindowFocus: false,
retry: false,
staleTime: STALE_TIME,
};
}),
});