BUR-64 Убран loader с графика. Во время зума храним предыдущее состояние до тех пор, пока не пришла новая серия

This commit is contained in:
Первов Артем
2026-07-05 16:24:46 +03:00
parent f4cefe376c
commit e057f55c73
3 changed files with 20 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useQueries } from '@tanstack/react-query';
import { keepPreviousData, useQueries } from '@tanstack/react-query';
import { getHistory } from '../../entities/history/api';
import type { HistoryPoint } from '../../entities/history/types';
@@ -35,6 +35,7 @@ export function useHistoryChartQueries({
queryKey: ['history', edge, tag, from, to, granulate],
queryFn: ({ signal }: { signal: AbortSignal }) => getHistory({ edge, tag, from, to, granulate }, signal),
enabled,
placeholderData: keepPreviousData,
})),
});