third place marks
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user