Разработка админ-панели EventHubFrontAdmin v1.0 #1

This commit is contained in:
2026-05-23 20:43:21 +03:00
parent 36c95b71a4
commit f5961c5529
68 changed files with 10374 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
import { useQuery } from '@tanstack/react-query';
import { dashboardApi } from '../api/dashboardApi';
import { normalizeData } from '../utils/normalize';
export const useDashboardStats = (from?: string, to?: string) => {
return useQuery({
queryKey: ['dashboard', from, to],
queryFn: async () => {
const data = await dashboardApi.getStats(from, to);
return normalizeData(data);
},
});
};