Added onClick to anchor tag as well #SW-222

This commit is contained in:
Linus Flood
2024-10-23 14:31:02 +02:00
parent cf3f54d752
commit d7676a22cc

View File

@@ -75,7 +75,15 @@ export default function Link({
} }
return isExternal ? ( return isExternal ? (
<a {...linkProps} {...props} /> <a
{...linkProps}
{...props}
onClick={(e) => {
if (onClick) {
onClick(e)
}
}}
/>
) : ( ) : (
<NextLink <NextLink
scroll={scroll} scroll={scroll}