|
1 | 1 | import { useQuery } from "@tanstack/react-query"; |
2 | 2 | import { |
3 | | - getAnalyticsSummary, |
4 | | - getEventsAnalytics, |
5 | | - getOrganizerScans, |
| 3 | + getAnalyticsSummary, |
| 4 | + getEventsAnalytics, |
| 5 | + getOrganizerScans, |
6 | 6 | } from "./provider"; |
7 | 7 | import { |
8 | | - AnalyticsSummaryResponse, |
9 | | - AnalyticsEventsResponse, |
10 | | - AnalyticsScansResponse, |
| 8 | + AnalyticsSummaryResponse, |
| 9 | + AnalyticsEventsResponse, |
| 10 | + AnalyticsScansResponse, |
11 | 11 | } from "./entity"; |
12 | 12 |
|
13 | 13 | export const analyticsQueryKeys = { |
14 | | - summary: ["analytics", "summary"] as const, |
15 | | - events: ["analytics", "events"] as const, |
16 | | - scans: ["analytics", "scans"] as const, |
| 14 | + summary: ["analytics", "summary"] as const, |
| 15 | + events: ["analytics", "events"] as const, |
| 16 | + scans: ["analytics", "scans"] as const, |
17 | 17 | }; |
18 | 18 |
|
19 | 19 | export function useAnalyticsSummary() { |
20 | | - return useQuery<AnalyticsSummaryResponse>({ |
21 | | - queryKey: analyticsQueryKeys.summary, |
22 | | - queryFn: getAnalyticsSummary, |
23 | | - }); |
| 20 | + return useQuery<AnalyticsSummaryResponse>({ |
| 21 | + queryKey: analyticsQueryKeys.summary, |
| 22 | + queryFn: getAnalyticsSummary, |
| 23 | + }); |
24 | 24 | } |
25 | 25 |
|
26 | 26 | export function useEventsAnalytics() { |
27 | | - return useQuery<AnalyticsEventsResponse[]>({ |
28 | | - queryKey: analyticsQueryKeys.events, |
29 | | - queryFn: getEventsAnalytics, |
30 | | - }); |
| 27 | + return useQuery<AnalyticsEventsResponse[]>({ |
| 28 | + queryKey: analyticsQueryKeys.events, |
| 29 | + queryFn: getEventsAnalytics, |
| 30 | + }); |
31 | 31 | } |
32 | 32 |
|
33 | 33 | export function useOrganizerScans() { |
34 | | - return useQuery<AnalyticsScansResponse[]>({ |
35 | | - queryKey: analyticsQueryKeys.scans, |
36 | | - queryFn: getOrganizerScans, |
37 | | - }); |
| 34 | + return useQuery<AnalyticsScansResponse[]>({ |
| 35 | + queryKey: analyticsQueryKeys.scans, |
| 36 | + queryFn: getOrganizerScans, |
| 37 | + }); |
38 | 38 | } |
0 commit comments