This commit is contained in:
2026-06-26 16:04:56 +03:30
parent d5e4803b04
commit 27b0eccd67
@@ -1,9 +1,12 @@
import { useQuery } from '@tanstack/react-query';
import * as api from '../service/DashboardService';
const DASHBOARD_COUNTS_REFETCH_MS = 2 * 60 * 1000;
export const useGetDashboardCounts = () => {
return useQuery({
queryKey: ['dashboard-counts'],
queryFn: () => api.getDashboardCounts(),
refetchInterval: DASHBOARD_COUNTS_REFETCH_MS,
});
};