const triggerTabList = document.querySelectorAll('#pills-tab button');
const triggerTabs = document.querySelectorAll('.tab-pane');

triggerTabs.forEach(triggerEl => {
    if(triggerEl.querySelector('.btn-next-tab')) {
    triggerEl.querySelector('.btn-next-tab').onclick = function(e) {
      window.scrollTo({
        top: 0,
        behavior: 'smooth'
      });
      const activeTab = document.querySelector('#pills-tab button.active');
      const clickNextTab = activeTab.parentNode.nextElementSibling.children;
      for (const child of clickNextTab) {
        child.click()
      }
    }
  }

});