From 4760efe837eae9ed1cad2e5dcd758132aa3b5512 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 21 Jan 2023 23:43:39 +0800 Subject: [PATCH] Need to pass the 'e' too --- src/components/link.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }} /> );