import { useQuery } from 'react-query';

import { getShowSessionsTutorial } from 'src/pages/dashboard/Learning/Sessions/services';
import { sToMs } from 'src/utils/timeUtils';

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

export const useGetShowSessionsTutorial = () => {
  return useQuery({
    queryKey: sessionsKeys.showSessionsTutorial(),
    queryFn: getShowSessionsTutorial,
    select: response => response.data.showAdminInformation,
    staleTime: sToMs(120),
  });
};
