import { useQueryClient } from 'react-query';

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

export const useInvalidateEvent = (eventId: number) => {
  const queryClient = useQueryClient();
  return () => queryClient.invalidateQueries(eventsKeys.event(eventId));
};
