diff --git a/app/features/tournament-lfg/TournamentLFGRepository.server.ts b/app/features/tournament-lfg/TournamentLFGRepository.server.ts index ee27c1037..783f64a8e 100644 --- a/app/features/tournament-lfg/TournamentLFGRepository.server.ts +++ b/app/features/tournament-lfg/TournamentLFGRepository.server.ts @@ -163,13 +163,14 @@ export function mergeTeams({ "Group has too many members after merge", ); - if (memberCount >= maxGroupSize) { - await trx - .updateTable("TournamentTeam") - .set({ isLooking: 0 }) - .where("id", "=", survivingTeamId) - .execute(); - } + await trx + .updateTable("TournamentTeam") + .set({ + isLooking: memberCount >= maxGroupSize ? 0 : undefined, + isPlaceholder: 0, + }) + .where("id", "=", survivingTeamId) + .execute(); }); } diff --git a/app/features/tournament-lfg/components/LFGGroupCard.tsx b/app/features/tournament-lfg/components/LFGGroupCard.tsx index 69e8da5a9..e7cd589e0 100644 --- a/app/features/tournament-lfg/components/LFGGroupCard.tsx +++ b/app/features/tournament-lfg/components/LFGGroupCard.tsx @@ -47,7 +47,6 @@ export type LFGGroup = { usersRole: "OWNER" | "MANAGER" | "REGULAR" | null; }; -// xxx: make sure we don't show team name if isPlaceholder // xxx: "cancel" & "save" buttons off export function LFGGroupCard({ group, diff --git a/app/features/tournament-lfg/loaders/to.$id.looking.server.ts b/app/features/tournament-lfg/loaders/to.$id.looking.server.ts index 9dad8d51b..318e48c32 100644 --- a/app/features/tournament-lfg/loaders/to.$id.looking.server.ts +++ b/app/features/tournament-lfg/loaders/to.$id.looking.server.ts @@ -21,8 +21,8 @@ export const loader = async ({ params }: LoaderFunctionArgs) => { return { id: group.id, isPlaceholder: Boolean(group.isPlaceholder), - teamName: group.teamName ?? null, - teamAvatarUrl: group.teamAvatarUrl ?? null, + teamName: group.isPlaceholder ? null : (group.teamName ?? null), + teamAvatarUrl: group.isPlaceholder ? null : (group.teamAvatarUrl ?? null), note: group.note ?? null, members, usersRole: members.find((m) => m.id === user?.id)?.role ?? null,