diff --git a/src/components/link.jsx b/src/components/link.jsx index 39698d26..5c1276eb 100644 --- a/src/components/link.jsx +++ b/src/components/link.jsx @@ -23,9 +23,9 @@ const Link = (props) => { href={`#${props.to}`} {...props} class={`${props.class || ''} ${isActive ? 'is-active' : ''}`} - onClick={() => { + onClick={(e) => { if (routerLocation) states.prevLocation = routerLocation; - props.onClick?.(); + props.onClick?.(e); }} /> );