Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/ui/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
}

if (isHash) {
// Use I18nLink for hash links to ensure proper browser history management
// This prevents issues where back navigation from a subpage to a page with
// a hash URL fails to re-render the page (the browser would interpret it
// as a same-page scroll rather than a route change)
return (
<a
<I18nLink
onClick={(e) => {
e.stopPropagation()
trackCustomEvent(
Expand All @@ -175,7 +179,7 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
{...commonProps}
>
{children}
</a>
</I18nLink>
)
}

Expand Down