"use client"; import { GroupId, GroupTable, Match, Team } from "@/lib/types"; import Flag from "./Flag"; function teamById(teams: Team[], id: string) { return teams.find((t) => t.id === id); } function liveMatchFor(group: string, matches: Match[]) { return matches.find( (m) => m.group === group && (m.status === "LIVE" || m.status === "IN_PLAY" || m.status === "PAUSED"), ); } export default function Groups({ tables, teams, matches, onOpenGroup, }: { tables: GroupTable[]; teams: Team[]; matches: Match[]; onOpenGroup: (g: GroupId) => void; }) { return (
| Mannschaft | Sp | S | U | N | Tore | ± | Pkt |
|---|---|---|---|---|---|---|---|
|
{r.rank}
|
{r.played} | {r.won} | {r.drawn} | {r.lost} | {r.goalsFor}:{r.goalsAgainst} | {r.goalDiff > 0 ? `+${r.goalDiff}` : r.goalDiff} | {r.points} |