Skip to content

Commit

Permalink
black hole
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Oct 18, 2023
1 parent 4810126 commit b7ac33c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/houdini-react/src/runtime/routing/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ function useLinkNavigation({ goto }: { goto: (url: string) => void }) {
React.useEffect(() => {
const onClick: HTMLAnchorElement['onclick'] = (e) => {
const link = (e.target as HTMLElement | null | undefined)?.closest('a')
// its a link we want to handle so don't navigate like normal
e.preventDefault()
e.stopPropagation()

// we only want to capture a "normal click" ie something that indicates a route transition
// in the current tab
Expand Down

0 comments on commit b7ac33c

Please sign in to comment.