Skip to content

Commit

Permalink
Merge pull request #68 from data-preservation-programs/fix-navlinks-s…
Browse files Browse the repository at this point in the history
…ignup-page

fix: nav jumplinks for index page navigate correctly from signup page
  • Loading branch information
orvn authored Nov 28, 2023
2 parents 401048c + a363e6f commit eb236df
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions components/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ const emit = defineEmits(['nav-link-click'])
const scrollToSection = async (el) => {
emit('nav-link-click')
const id = el.replaceAll('#', '')
const section = document.getElementById(id)
if (section) {
await navigateTo({
path: '/',
query: {
section: id
}
})
section.scrollIntoView({ behavior: 'smooth' })
}
await navigateTo({
path: '/',
query: {
section: id
}
})
section.scrollIntoView({ behavior: 'smooth' })
}
</script>

Expand Down

0 comments on commit eb236df

Please sign in to comment.