Skip to content

Commit 2c3bec2

Browse files
committed
fix: use anchor for hash links over next/link
fixes skipnav navigation bug
1 parent 64c444d commit 2c3bec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tailwind/Link.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
139139

140140
if (isHash) {
141141
return (
142-
<NextLink
142+
<a
143143
onClick={(e) => {
144144
e.stopPropagation()
145145
trackCustomEvent(
@@ -154,7 +154,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
154154
{...commonProps}
155155
>
156156
{children}
157-
</NextLink>
157+
</a>
158158
)
159159
}
160160

0 commit comments

Comments
 (0)