src/components/form/Form.js
/**
   * helper function that works as an event listener for req type button clicks
   * @param   {object} e event listener object
   * @return  {void}
   */
helper function that works as an event listener for req type button clicks
@param   {object} e event listener object
@return  {void}
helper function that works as an event listener for req type button clicks @param { object } e event listener object @return { void }
function handleBtnClick(e) {
    const prevSelected = document.querySelector('.selected-req');
    if (prevSelected) {
      prevSelected.classList.remove('selected-req');
    }
    e.target.classList.add('selected-req');
    props.onClick(e.target.value);
  }
function handleBtnClick ( e ) { const prevSelected = document . querySelector ( '.selected-req' ) ; if ( prevSelected ) { prevSelected . classList . remove ( 'selected-req' ) ; } e . target . classList . add ( 'selected-req' ) ; props . onClick ( e . target . value ) ; }
helper function that works as an event listener for req type button clicks
 @param   {object} e event listener object
 @return  {void}
helper function that works as an event listener for req type button clicks @param { object } e event listener object @return { void }