🐛 fix(atoms): prevent IconLinks click propagation

This commit is contained in:
2024-02-15 17:11:00 +01:00
parent 21c24bdb9a
commit 44a0dcd89f
+6 -1
View File
@@ -16,7 +16,12 @@ interface IconWrapperProps extends IconLinkProps {
const IconWrapper = ({ index, href: to, fontSize, Icon, ...props }: IconWrapperProps) => { const IconWrapper = ({ index, href: to, fontSize, Icon, ...props }: IconWrapperProps) => {
if (typeof index === 'undefined') { if (typeof index === 'undefined') {
return ( return (
<IconButton onClick={() => window.open(to, '_blank')} {...props}> <IconButton
onClick={e => {
e.stopPropagation()
window.open(to, '_blank')
}}
{...props}>
<Icon fontSize={fontSize} /> <Icon fontSize={fontSize} />
</IconButton> </IconButton>
) )