From b96eba9b2c15f5c4963faf46c652068d9b369b0f Mon Sep 17 00:00:00 2001 From: joyeongchan Date: Thu, 13 Aug 2026 02:34:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=9C=EC=9E=91=20=ED=9B=84=20=EC=B9=9C=EA=B5=AC=20=EC=B4=88?= =?UTF-8?q?=EB=8C=80=20=EB=B2=84=ED=8A=BC=20=EC=88=A8=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 참여자 패널의 + 버튼에 노출 조건이 없어, 시작 후에도 초대 진입점이 남아 있었다. 시작 이후에는 새 참여자를 받을 수 없다. - ParticipantPanel 에 ownerStarted prop 추가 - 시작 후 + 버튼 숨김 (주최자·참여자 양쪽) - 시트를 열어둔 사이 시작된 경우도 함께 닫음 --- .../_components/TournamentCreateClient.tsx | 1 + .../participant-panel/ParticipantPanel.tsx | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/tournament/[id]/create/_components/TournamentCreateClient.tsx b/apps/web/src/app/tournament/[id]/create/_components/TournamentCreateClient.tsx index b1254a8a..3d7a4918 100644 --- a/apps/web/src/app/tournament/[id]/create/_components/TournamentCreateClient.tsx +++ b/apps/web/src/app/tournament/[id]/create/_components/TournamentCreateClient.tsx @@ -187,6 +187,7 @@ function TournamentCreateClient({ tournamentId }: TournamentCreateClientProps) { participants={participants} inviteCode={pending?.inviteCode ?? ''} inviteExpiresAt={pending?.inviteExpiresAt ?? ''} + ownerStarted={ownerStarted} {...(isCollaborative && !ownerStarted && !isDepositClosed && { depositDeadline })} /> diff --git a/apps/web/src/app/tournament/[id]/create/_components/participant-panel/ParticipantPanel.tsx b/apps/web/src/app/tournament/[id]/create/_components/participant-panel/ParticipantPanel.tsx index 472aba71..cada3d2d 100644 --- a/apps/web/src/app/tournament/[id]/create/_components/participant-panel/ParticipantPanel.tsx +++ b/apps/web/src/app/tournament/[id]/create/_components/participant-panel/ParticipantPanel.tsx @@ -34,6 +34,8 @@ type ParticipantPanelProps = { inviteExpiresAt?: string; /** 담기 마감 시각 — 있을 때만 타이머 노출 */ depositDeadline?: string; + /** 주최자가 토너먼트를 시작했는지 — 시작 후에는 새 참여자를 받을 수 없다 */ + ownerStarted?: boolean; }; const PLACEHOLDER_AVATAR_COUNT = 2; @@ -43,6 +45,7 @@ function ParticipantPanel({ inviteCode, inviteExpiresAt, depositDeadline, + ownerStarted = false, }: ParticipantPanelProps) { const { id: tournamentId } = useParams<{ id: string }>(); const { refetchTournament } = useGetTournament(Number(tournamentId)); @@ -104,14 +107,17 @@ function ParticipantPanel({ {participants.map(({ user, itemCount }) => ( ))} - + {/* 시작 후에는 새 참여자를 받을 수 없어 초대 진입점을 숨긴다 */} + {!ownerStarted && ( + + )} )} @@ -144,8 +150,9 @@ function ParticipantPanel({ )} + {/* 시트를 열어둔 사이 주최자가 시작하면 초대가 무의미해지므로 함께 닫는다 */}