diff --git a/packages/router/src/components/Link.tsx b/packages/router/src/components/Link.tsx index 530d0def..a5a6b6e1 100644 --- a/packages/router/src/components/Link.tsx +++ b/packages/router/src/components/Link.tsx @@ -24,6 +24,12 @@ export default function Link( const handleTransition = (e: MouseEvent): void => { e.preventDefault() props.onClick?.(e) + + if (props.href?.startsWith('#')) { + window.location.hash = props.href + return + } + router.push(props.href || '') }