import { useQuery } from 'react-query';

import { getCoursesMetrics } from 'src/pages/dashboard/Learning/Courses/services';

import { coursesKeys } from '../queries';

export const useGetCoursesMetrics = () => {
  return useQuery({
    queryKey: coursesKeys.metrics(),
    queryFn: getCoursesMetrics,
    select: response => response.data,
  });
};
