User
How can I sue this rect query hook to only call it when a form is submitted 

export const useListEvents = (
  data: EventSearchFormValues,
  from: number,
  size: number,
): UseListEventsInterface => {
  const { t } = useTranslation();
  const {
    result,
    branchStatus: status,
    refetch,
  } = useQueryWrapper<PaginatedResponse<SportingEvent>, EventSearchFormValues>(
    [manualActionsHooks.listEvents, data],
    () => postListEventsAPI(data, from, size),
    {
      meta: {
        errorMessage: pleaseTryAgainMessage(
          t,
          'listing the activity log search results',
        ),
      },
    },
  );

  return { result, status, refetch };
};