import { useQuery } from '@tanstack/react-query';
import { getPerformance, type PerformanceParams } from '../api/performance';

export function usePerformance(params?: PerformanceParams) {
  return useQuery({
    queryKey: ['performance', params ?? null],
    queryFn: () => getPerformance(params),
  });
}
