From 1532c102232cf5bfb76e895b004ce24fab8101d9 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Fri, 3 Apr 2026 19:26:52 -0700 Subject: [PATCH] feat: integrate TeamsSection component into tournament detail page Update tournament detail page to use new TeamsSection component: - Import TeamsSection component - Replace static teams display with interactive configuration - Pass tournament ID, teams, and participants to component Refs #22 --- src/app/admin/tournaments/[id]/page.tsx | 38 +++++++++---------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/src/app/admin/tournaments/[id]/page.tsx b/src/app/admin/tournaments/[id]/page.tsx index 43492bd..1c6255a 100644 --- a/src/app/admin/tournaments/[id]/page.tsx +++ b/src/app/admin/tournaments/[id]/page.tsx @@ -6,6 +6,7 @@ import { notFound, redirect } from "next/navigation" import { canManageTournament, canDeleteTournament } from "@/lib/permissions" import { getTournamentStatus } from "@/lib/tournamentUtils" import { DeleteTournamentButton } from "@/components/DeleteTournamentButton" +import TeamsSection from "@/components/TeamsSection" interface PageProps { params: { @@ -284,31 +285,18 @@ export default async function TournamentDetailPage({ params }: PageProps) { {/* Teams Section */} -
-

- Teams ({tournament.teams.length}) -

- - {tournament.teams.length > 0 ? ( -
- {tournament.teams.map((team) => ( -
-
-

- {team.player1.name} + {team.player2.name} -

-

{team.teamName}

-
-
- ))} -
- ) : ( -

No teams created yet.

- )} -
+ ({ + id: p.player.id, + name: p.player.name, + currentElo: p.player.currentElo, + }))} + teamDurability={tournament.teamDurability || "permanent"} + partnerRotation={tournament.partnerRotation || "none"} + allowByes={tournament.allowByes ?? true} + /> {/* Recent Matches Section */}