Skip to content

Commit

Permalink
reduce logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Oct 18, 2023
1 parent 0934e9c commit abe8625
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/houdini-react/src/runtime/routing/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ function useLinkBehavior({
goto: (url: string) => void
preload: (url: string, which: PreloadWhichValue) => void
}) {
console.log('registering link behavior')
// always use the click handler
useLinkNavigation({ goto })

Expand All @@ -531,8 +532,6 @@ function useLinkNavigation({ goto }: { goto: (url: string) => void }) {
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()
console.log('link', link)

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

0 comments on commit abe8625

Please sign in to comment.