From 41124759e1fdddc06f2c344c92c4a4578435fa95 Mon Sep 17 00:00:00 2001 From: bringvotrevin Date: Tue, 26 Sep 2023 09:21:21 +0900 Subject: [PATCH] feat: move ga4 click event in ResultCard --- src/components/common/ResultCard/ResultCard.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/common/ResultCard/ResultCard.tsx b/src/components/common/ResultCard/ResultCard.tsx index 9f2f4b3..3695335 100644 --- a/src/components/common/ResultCard/ResultCard.tsx +++ b/src/components/common/ResultCard/ResultCard.tsx @@ -26,16 +26,13 @@ const ResultCard = (props: ResultCardProps) => { const { id: roomId } = useParams(); const handleLinkClick = (event: React.MouseEvent) => { - event.stopPropagation(); - window.open(props.link); - }; - - const handleClickResultCard = () => { ReactGA.event({ category: 'click', action: '1등_카드', label: '투표 결과 화면(1등)', }); + event.stopPropagation(); + window.open(props.link); }; const handleClickOverallRanking = () => { @@ -64,7 +61,7 @@ const ResultCard = (props: ResultCardProps) => { ); return ( - + {props.winnerNum === 1 ? oneWinner : multipleWinner}