From 9cbd13042de41528945897d03c46976abb76deb3 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 15 Apr 2026 14:34:46 +0100 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20CardHorizontal?= =?UTF-8?q?=20double=20onClick=20handler=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The inner Button component was using the same handleClick handler as the parent Wrapper, causing event bubbling that invoked onButtonClick and window.open(infoUrl) twice when the button was clicked. Added a new handleButtonClick wrapper that calls e.stopPropagation() before invoking the main handleClick, preventing the event from bubbling to the parent Wrapper. Fixes the bug reported in CardHorizontal.tsx:285 --- src/components/CardHorizontal/CardHorizontal.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/CardHorizontal/CardHorizontal.tsx b/src/components/CardHorizontal/CardHorizontal.tsx index d00628c61..4d7283390 100644 --- a/src/components/CardHorizontal/CardHorizontal.tsx +++ b/src/components/CardHorizontal/CardHorizontal.tsx @@ -208,6 +208,11 @@ export const CardHorizontal = ({ window.open(infoUrl, '_blank'); } }; + + const onClickButtonHandler = (e: React.MouseEvent) => { + e.stopPropagation(); + handleClick(e); + }; return (