Need to pass the 'e' too

This commit is contained in:
Lim Chee Aun 2023-01-21 23:43:39 +08:00
parent 952f048913
commit 4760efe837

View file

@ -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);
}}
/>
);