import { IUnits } from '@/app/_utils/types/units';
import { useQuery } from '@tanstack/react-query';
import { getUnits } from '../action';

export const useGetUnitsQuery = () => {
  return useQuery<IUnits[]>({
    queryKey: ['units'],
    queryFn: () => getUnits(),
  });
};
