import { useMutation } from 'react-query';

import { queryClient } from 'src/config/react-query';
import { hideSessionsTutorial } from 'src/pages/dashboard/Learning/Sessions/services';

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

export const useHideSessionsTutorial = () => {
  return useMutation({
    mutationFn: hideSessionsTutorial,
    onSuccess: () => {
      queryClient.invalidateQueries(sessionsKeys.showSessionsTutorial());
    },
  });
};
