"use client"; import { GroupTable, Match, Team } from "@/lib/types"; 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, }: { tables: GroupTable[]; teams: Team[]; matches: Match[] }) { return (
| Team | Sp | S | U | N | Tore | ± | Pkt |
|---|---|---|---|---|---|---|---|
| {r.rank} {team?.name ?? r.teamId} {team?.code && {team.code}} | {r.played} | {r.won} | {r.drawn} | {r.lost} | {r.goalsFor}:{r.goalsAgainst} | {r.goalDiff > 0 ? `+${r.goalDiff}` : r.goalDiff} | {r.points} |