app/javascript/controllers/shared_controller.js
/**
   * toggleModal
   * @param {*} e - Event
   * Toggle the is-active class to hide and show a modal for the given passed in data-id
   */
toggleModal
@param {*} e - Event
Toggle the is-active class to hide and show a modal for the given passed in data-id
toggleModal @param { * } e - Event Toggle the is - active class to hide and show a modal for the given passed in data - id
toggleModal (e) {
    let modalId = e.currentTarget.dataset.id
    document.getElementById(modalId).classList.toggle('is-active')
  }
toggleModal ( e ) { let modalId = e . currentTarget . dataset . id document . getElementById ( modalId ) . classList . toggle ( 'is-active' ) }
toggleModal
 @param {*} e - Event
 Toggle the is-active class to hide and show a modal for the given passed in data-id
toggleModal @param { * } e - Event Toggle the is - active class to hide and show a modal for the given passed in data - id
// console.log(e.currentTarget.dataset.id)