import { useQuery } from '@tanstack/react-query';
import { apiFetch } from '../lib/api';
import type { Report } from '../lib/types';

export function useReport() {
  return useQuery({
    queryKey: ['report'],
    queryFn: () => apiFetch<Report>('/report'),
  });
}
