From 39c20030803ea27d303dfc9fd3b9fc0f8101140c Mon Sep 17 00:00:00 2001 From: jwkim Date: Thu, 18 Jun 2026 15:57:40 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=B4=20=EC=A7=80=EB=82=9C=20=EC=98=88?= =?UTF-8?q?=EC=B8=A1=EC=9D=84=20=ED=88=AC=ED=91=9C=20=ED=9B=84=EC=97=90?= =?UTF-8?q?=EB=A7=8C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Arena.tsx | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/frontend/src/components/Arena.tsx b/frontend/src/components/Arena.tsx index 6afc368..282b2f0 100644 --- a/frontend/src/components/Arena.tsx +++ b/frontend/src/components/Arena.tsx @@ -75,25 +75,6 @@ export default function Arena({ ); }, [scoreA, scoreB]); - // 재방문 시: 가장 최근 사용 이메일로 내 지난 예측 자동 로드 (로그인 대체). - // 이메일 칸은 비워둠 — develop UX(포커스 시 datalist 자동완성)를 유지. - useEffect(() => { - const last = getRecentEmails()[0]; - if (last) fetchMyPredictions(last).then(setMyPreds).catch(() => {}); - }, []); - - // 이 경기에 대한 내 기존 픽 (있으면 스코어 프리필 + 목록에서 강조) - const myThisMatch = useMemo( - () => myPreds.find((p) => p.matchId === match.matchId), - [myPreds, match.matchId], - ); - useEffect(() => { - if (myThisMatch) { - setScoreA(myThisMatch.scoreA); - setScoreB(myThisMatch.scoreB); - } - }, [myThisMatch]); - // 투표 가능 여부는 백엔드 계산(votingOpen, demo 반영) + phase 라벨. const finished = !!match.result; const disabled = finished || !match.votingOpen; @@ -341,13 +322,7 @@ export default function Arena({ list="tp-email-suggestions" autoComplete="email" value={email} - onChange={(e) => { - const v = e.target.value; - setEmail(v); - // 유효 이메일이면 그 즉시 내 지난 예측 조회(다른 기기/세션 흔적까지 표시) - if (EMAIL_RE.test(v.trim())) - fetchMyPredictions(v.trim()).then(setMyPreds).catch(() => {}); - }} + onChange={(e) => setEmail(e.target.value)} placeholder={t.emailPh} className="w-full rounded-2xl border border-[var(--share)] bg-[#0f1217] px-4 py-3 text-[16px] text-white shadow-[0_0_0_2px_rgba(166,94,255,0.12)] outline-none focus:shadow-[0_0_0_2px_rgba(166,94,255,0.3)]" />