refactor use cases
This commit is contained in:
11
apps/website/hooks/useDashboardService.ts
Normal file
11
apps/website/hooks/useDashboardService.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useServices } from '@/lib/services/ServiceProvider';
|
||||
|
||||
export function useDashboardOverview() {
|
||||
const { dashboardService } = useServices();
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['dashboardOverview'],
|
||||
queryFn: () => dashboardService.getDashboardOverview(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user