fix pagination

This commit is contained in:
smanylov
2026-05-06 19:12:37 +07:00
parent 8a72dbaf68
commit 84b07af246
2 changed files with 10 additions and 3 deletions
+3 -2
View File
@@ -22,7 +22,7 @@ export interface UseHistoryView {
export const useHistoryView = (page: number, size: number) => {
return useQuery({
queryKey: ['violationStatistic'],
queryKey: ['violationStatistic', page, size],
queryFn: () => {
return fetchHistoryView(page, size)
},
@@ -32,6 +32,7 @@ export const useHistoryView = (page: number, size: number) => {
}
return data;
},
retry: false
retry: false,
placeholderData: (previousData) => previousData // для оптимистичных обновлений
});
};