Skip to content

Commit

Permalink
fix: use anchor for hash links over next/link
Browse files Browse the repository at this point in the history
fixes skipnav navigation bug
  • Loading branch information
wackerow committed Jul 29, 2024
1 parent 64c444d commit 2c3bec2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tailwind/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(

if (isHash) {
return (
<NextLink
<a
onClick={(e) => {
e.stopPropagation()
trackCustomEvent(
Expand All @@ -154,7 +154,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
{...commonProps}
>
{children}
</NextLink>
</a>
)
}

Expand Down

0 comments on commit 2c3bec2

Please sign in to comment.