Files
property-match/src/hooks/useSupplyDashboard.ts
T

12 lines
370 B
TypeScript

import { useQuery } from '@tanstack/react-query'
import { dashboardService } from '../services/dashboardService'
import type { DashboardData } from '../domain/dashboard'
export function useSupplyDashboard() {
return useQuery<DashboardData>({
queryKey: ['supply', 'dashboard'],
queryFn: () => dashboardService.getDashboardData(),
staleTime: 30_000,
})
}