From 50031b4dae3c4c0c4953ef2a423f0ba1bdd1062a Mon Sep 17 00:00:00 2001 From: heesunee Date: Mon, 8 Sep 2025 14:23:17 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20sign-up=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=B0=B0=EA=B2=BD=EC=83=89=20=EC=A7=A4=EB=A6=AC?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20(#383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sign-up/components/signup-step.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/sign-up/components/signup-step.tsx b/src/pages/sign-up/components/signup-step.tsx index ed302811..db31fbf0 100644 --- a/src/pages/sign-up/components/signup-step.tsx +++ b/src/pages/sign-up/components/signup-step.tsx @@ -118,7 +118,7 @@ const SignupStep = () => { return (

{NICKNAME_TITLE}

From d970b36e6be9ed21879b5f6a131a6e8ac57da536 Mon Sep 17 00:00:00 2001 From: heesunee Date: Mon, 8 Sep 2025 14:25:28 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20match-card-view=20gaEvent=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20(#383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/match/match.tsx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/pages/match/match.tsx b/src/pages/match/match.tsx index bed13a90..227d3889 100644 --- a/src/pages/match/match.tsx +++ b/src/pages/match/match.tsx @@ -8,7 +8,6 @@ import { mapGroupMatchData, mapSingleMatchData } from '@pages/match/hooks/mapMat import { useMatchTabState } from '@pages/match/hooks/useMatchTabState'; import { fillTabItems } from '@pages/match/utils/match-status'; import { useQuery } from '@tanstack/react-query'; -import { useEffect } from 'react'; import type { MatchCardData } from './create/types/match-data-type'; const Match = () => { @@ -26,26 +25,6 @@ const Match = () => { enabled: activeType === '그룹', }); - useEffect(() => { - if (activeType === '1:1' && singleData?.results) { - singleData.results.forEach((card) => { - gaEvent('match_card_view', { - match_id: card.id, - match_type: 'one_to_one', - match_status: card.status, - }); - }); - } else if (activeType === '그룹' && groupData?.mates) { - groupData.mates.forEach((card) => { - gaEvent('match_card_view', { - match_id: card.id, - match_type: 'group', - match_status: card.status, - }); - }); - } - }, [singleData, groupData, activeType]); - const handleCardClick = (card: MatchCardData) => { gaEvent('match_card_click', { match_id: card.id, From fc3d30e8f78beb84d1f064c6e2ad3f1d441c2622 Mon Sep 17 00:00:00 2001 From: heesunee Date: Mon, 8 Sep 2025 14:54:31 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20gaEvent=20=EC=9C=84=EC=B9=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/onboarding/utils/onboarding-button.ts | 1 - .../bottom-sheet/game-match/game-match-bottom-sheet.tsx | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/onboarding/utils/onboarding-button.ts b/src/pages/onboarding/utils/onboarding-button.ts index a6b727b4..525fb2d9 100644 --- a/src/pages/onboarding/utils/onboarding-button.ts +++ b/src/pages/onboarding/utils/onboarding-button.ts @@ -79,7 +79,6 @@ export const handleButtonClick = ( if (selections.GROUP_ROLE === '그룹원') { goTo?.('COMPLETE'); } else { - gaEvent('match_create_click', { match_type: 'group', role: 'creator' }); gaEvent('condition_set_completed', { match_type: 'group' }); goNext(); } diff --git a/src/shared/components/bottom-sheet/game-match/game-match-bottom-sheet.tsx b/src/shared/components/bottom-sheet/game-match/game-match-bottom-sheet.tsx index 81571666..a232285a 100644 --- a/src/shared/components/bottom-sheet/game-match/game-match-bottom-sheet.tsx +++ b/src/shared/components/bottom-sheet/game-match/game-match-bottom-sheet.tsx @@ -6,6 +6,7 @@ import GameMatchList from '@components/bottom-sheet/game-match/game-match-list'; import { formatDateWeekday } from '@components/bottom-sheet/game-match/utils/format-date-weekday'; import { TAB_TYPES, type TabType } from '@components/tab/tab/constants/tab-type'; import { MATCH_REQUEST_ERROR_MESSAGES } from '@constants/error-toast'; +import { gaEvent } from '@libs/analytics'; import { ROUTES } from '@routes/routes-config'; import { useMutation, useQueryClient } from '@tanstack/react-query'; import type { AxiosError } from 'axios'; @@ -60,6 +61,12 @@ const GameMatchBottomSheet = ({ const selectedGame = gameSchedule[selectedIdx]; if (!selectedGame) return; + const gaMatchType = activeType === TAB_TYPES.SINGLE ? 'one_to_one' : 'group'; + gaEvent('match_create_click', { + match_type: gaMatchType, + role: 'creator', + }); + createMatchMutation.mutate( { gameId: selectedGame.id, From df3791fcf15cc4ff184e4008b25f1b6ea50a9f1e Mon Sep 17 00:00:00 2001 From: heesunee Date: Mon, 8 Sep 2025 15:10:49 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=EC=BA=90=EC=8B=9C=EA=B0=80=20?= =?UTF-8?q?=EC=84=9E=EC=9D=B4=EB=A9=B4=EC=84=9C=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=A4=91=EB=B3=B5=EB=90=98=EB=8A=94=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20(#383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../match/components/match-tab-pannel.tsx | 34 +++++++++++---- src/pages/match/match.tsx | 42 ++++--------------- 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/src/pages/match/components/match-tab-pannel.tsx b/src/pages/match/components/match-tab-pannel.tsx index e50ce126..cbdcfd36 100644 --- a/src/pages/match/components/match-tab-pannel.tsx +++ b/src/pages/match/components/match-tab-pannel.tsx @@ -1,11 +1,12 @@ +// src/pages/match/components/match-tab-pannel.tsx import { matchMutations } from '@apis/match/match-mutations'; +import { matchQueries } from '@apis/match/match-queries'; import Card from '@components/card/match-card/card'; import type { GroupCardProps, SingleCardProps } from '@components/card/match-card/types/card'; import { getColorType } from '@components/card/match-card/utils/get-color-type'; import EmptyView from '@components/ui/empty-view'; import { cn } from '@libs/cn'; import { CLICKABLE_STATUS_MAP } from '@pages/match/constants/matching'; -import type { MatchCardData } from '@pages/match/create/types/match-data-type'; import { getCardColor, getPendingToast, @@ -13,26 +14,43 @@ import { statusToCategory, } from '@pages/match/utils/match-status'; import { ROUTES } from '@routes/routes-config'; -import { useMutation } from '@tanstack/react-query'; +import { useMutation, useQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; import { showErrorToast } from '@/shared/utils/show-error-toast'; +import { mapGroupMatchData, mapSingleMatchData } from '../hooks/mapMatchData'; type MatchableCardProps = SingleCardProps | GroupCardProps; interface MatchTabPanelProps { - cards: MatchableCardProps[]; + activeType: '1:1' | '그룹'; + statusParam: string; filter: string; - onCardClick: (card: MatchCardData) => void; + onCardClick: (card: MatchableCardProps) => void; } -const MatchTabPanel = ({ cards, filter, onCardClick }: MatchTabPanelProps) => { +const MatchTabPanel = ({ activeType, filter, statusParam, onCardClick }: MatchTabPanelProps) => { const navigate = useNavigate(); + const isSingle = activeType === '1:1'; - const patchStageMutation = useMutation(matchMutations.MATCH_STAGE()); + const { data: singleData } = useQuery({ + ...matchQueries.SINGLE_MATCH_STATUS(statusParam), + enabled: isSingle, + }); + + const { data: groupData } = useQuery({ + ...matchQueries.GROUP_MATCH_STATUS(statusParam), + enabled: !isSingle, + }); + + const cards: MatchableCardProps[] = isSingle + ? mapSingleMatchData(singleData?.results) + : mapGroupMatchData(groupData?.mates); const filteredCards = filter === '전체' ? cards : cards.filter((card) => statusToCategory(card.status) === filter); + const patchStageMutation = useMutation(matchMutations.MATCH_STAGE()); + const handleCardClick = async (card: MatchableCardProps) => { onCardClick(card); @@ -70,9 +88,7 @@ const MatchTabPanel = ({ cards, filter, onCardClick }: MatchTabPanelProps) => { key={card.id} type="button" onClick={() => handleCardClick(card)} - className={cn('w-full', { - 'cursor-pointer': isClickable(card.status), - })} + className={cn('w-full', { 'cursor-pointer': isClickable(card.status) })} aria-disabled={!isClickable(card.status)} > { @@ -15,16 +11,6 @@ const Match = () => { const { type: activeType, filter } = tabState; const statusParam = filter === '전체' ? '' : filter; - const { data: singleData } = useQuery({ - ...matchQueries.SINGLE_MATCH_STATUS(statusParam), - enabled: activeType === '1:1', - }); - - const { data: groupData } = useQuery({ - ...matchQueries.GROUP_MATCH_STATUS(statusParam), - enabled: activeType === '그룹', - }); - const handleCardClick = (card: MatchCardData) => { gaEvent('match_card_click', { match_id: card.id, @@ -33,25 +19,6 @@ const Match = () => { }); }; - const contentMap = { - '1:1': ( - - ), - 그룹: ( - - ), - }; - return (
- + +
); }; From af5fb3a38d12ee7d55823795cf6125747fc274b0 Mon Sep 17 00:00:00 2001 From: heesunee Date: Mon, 8 Sep 2025 15:21:33 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20(#383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/match/components/match-tab-pannel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/match/components/match-tab-pannel.tsx b/src/pages/match/components/match-tab-pannel.tsx index cbdcfd36..de0e7f2a 100644 --- a/src/pages/match/components/match-tab-pannel.tsx +++ b/src/pages/match/components/match-tab-pannel.tsx @@ -1,4 +1,3 @@ -// src/pages/match/components/match-tab-pannel.tsx import { matchMutations } from '@apis/match/match-mutations'; import { matchQueries } from '@apis/match/match-queries'; import Card from '@components/card/match-card/card';