From 26ae0574b7b10f112575fd4d0cea23679438e1a1 Mon Sep 17 00:00:00 2001 From: Anders Date: Mon, 19 Feb 2024 18:00:48 +0100 Subject: [PATCH] :sparkles: Refactored and added join team details dialog --- components/tournament/teamDetailsDialog.tsx | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 components/tournament/teamDetailsDialog.tsx diff --git a/components/tournament/teamDetailsDialog.tsx b/components/tournament/teamDetailsDialog.tsx new file mode 100644 index 0000000..3e5d4f8 --- /dev/null +++ b/components/tournament/teamDetailsDialog.tsx @@ -0,0 +1,42 @@ +'use client'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from '@/components/ui/dialog'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import React, { ReactNode } from 'react'; +import { Team } from '@/app/tournament/[id]/before'; + +interface TeamCard { + team: Team; + children: ReactNode; +} + +export function TeamDetailsDialog({ team, children }: TeamCard) { + return ( + + {children} + + + {team.name} + +
+ + {team.players.map((player) => ( +
  • {player}
  • + ))} +
    + + + +
    +
    + ); +}