third place marks

This commit is contained in:
2026-06-27 12:15:34 -05:00
parent bf931e70c0
commit a721de5b23
4 changed files with 115 additions and 187 deletions

View File

@@ -3,12 +3,13 @@
import { Team, ThirdPlaceRow } from "@/lib/types";
export default function ThirdPlace({
rows, teams,
}: { rows: ThirdPlaceRow[]; teams: Team[] }) {
rows, teams, secureTeams,
}: { rows: ThirdPlaceRow[]; teams: Team[]; secureTeams?: string[] }) {
const name = (id: string) => {
const t = teams.find((t) => t.id === id);
return t?.localisedName ?? t?.name ?? id;
};
const secureSet = secureTeams ? new Set(secureTeams) : null;
return (
<div className="third-wrap">
@@ -35,7 +36,12 @@ export default function ThirdPlace({
>
<td>{r.overallRank}</td>
<td>{r.group}</td>
<td className={r.played === 3 ? "team-complete" : ""} style={{ fontWeight: 600 }}>{name(r.teamId)}</td>
<td className={r.played === 3 ? "team-complete" : ""} style={{ fontWeight: 600 }}>
{name(r.teamId)}
{secureSet?.has(r.teamId) && (
<span style={{ color: "var(--turf)", marginLeft: 6, fontSize: 13 }} title="sicher qualifiziert"></span>
)}
</td>
<td>{r.played}</td>
<td className="pts">{r.points}</td>
<td>{r.goalDiff > 0 ? `+${r.goalDiff}` : r.goalDiff}</td>