Skip to content

Commit

Permalink
🔥 [Index] Remove redundant hashchange listener
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 29, 2024
1 parent db6936c commit 6ad11be
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,4 @@ const [intro, ...portfolioSections] = sections;

const togglerInstance = new Toggler(NAV_TOGGLE_ID, NAV_ID);
togglerInstance.init();

// Even with smooth scrolling, this is necessary to mitigate some of
// the issues that arise from `lvh` sections + scroll tracking.
function handleHashChange() {
navTrackerInstance.safeUpdate(portfolioInstance.mostVisibleIndex);
}

window.addEventListener('hashchange', handleHashChange, false);
</script>

0 comments on commit 6ad11be

Please sign in to comment.