Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/web/src/app/invite/[id]/_components/InviteClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ function InviteClient({ tournamentId, inviteCode }: InviteClientProps) {
return;
}

/**
* 이미 참여한 유저(멤버·게스트 공통)가 같은 링크로 재진입하면 join 플로우를 건너뛰고
* 토너먼트로 바로 진입. preview 응답의 joined 로 판별 — 별도 조회 없이 preview 한 번으로 끝난다.
*/
if (preview.joined) {
router.replace(ROUTES.TOURNAMENT_CREATE(tournamentId));
return;
}

const user = await getMe().catch(() => null);
if (user?.identityType === 'MEMBER') {
await joinAsMemberAndGoToCreate();
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/app/tournament/join/_types/join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export type GetInvitePreviewResponseT = {
tournamentName: string;
itemCount: number;
participantCount: number;
/** 요청자(게스트/회원)가 이미 이 토너먼트에 참여 중인지. 미인증·미참여면 false */
joined: boolean;
};

export type PostJoinRequestT = {
Expand Down
Loading