src/components/form/Form.js
/**
   * helper function that works as an event listener for the submit button click or enter press
   * @param   {object} e event listener object
   * @return  {void}
   */
helper function that works as an event listener for the submit button click or enter press
@param   {object} e event listener object
@return  {void}
helper function that works as an event listener for the submit button click or enter press @param { object } e event listener object @return { void }
function handleSubmit(e) {
    if (e.key === 'Enter' || (e.target && e.target.value === 'Submit')) {
      const selectedReq = document.querySelector('.selected-req');
      const textbox = document.querySelector('.reqBody-textbox');
      props.onSubmit(selectedReq.value, textbox.value);
    }
  }
function handleSubmit ( e ) { if ( e . key === 'Enter' || ( e . target && e . target . value === 'Submit' ) ) { const selectedReq = document . querySelector ( '.selected-req' ) ; const textbox = document . querySelector ( '.reqBody-textbox' ) ; props . onSubmit ( selectedReq . value , textbox . value ) ; } }
helper function that works as an event listener for the submit button click or enter press
 @param   {object} e event listener object
 @return  {void}
helper function that works as an event listener for the submit button click or enter press @param { object } e event listener object @return { void }