locale second stage
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
"use client";
|
||||
|
||||
import { Team, ThirdPlaceRow } from "@/lib/types";
|
||||
import { Team, ThirdPlaceRow, teamName } from "@/lib/types";
|
||||
import { Dictionary } from "@/lib/i18n";
|
||||
|
||||
export default function ThirdPlace({
|
||||
rows, teams, secureTeams,
|
||||
}: { rows: ThirdPlaceRow[]; teams: Team[]; secureTeams?: string[] }) {
|
||||
rows, teams, secureTeams, dict,
|
||||
}: { rows: ThirdPlaceRow[]; teams: Team[]; secureTeams?: string[]; dict: Dictionary }) {
|
||||
const name = (id: string) => {
|
||||
const t = teams.find((t) => t.id === id);
|
||||
return t?.localisedName ?? t?.name ?? id;
|
||||
return teamName(t, "de");
|
||||
};
|
||||
const secureSet = secureTeams ? new Set(secureTeams) : null;
|
||||
|
||||
return (
|
||||
<div className="third-wrap">
|
||||
<p className="notice" style={{ marginBottom: 16 }}>
|
||||
Acht der zwölf Gruppendritten erreichen die Runde der letzten 32. Gewertet wird
|
||||
gruppenübergreifend nach Punkten, Tordifferenz und Toren — der Direktvergleich
|
||||
entfällt, weil diese Teams nie gegeneinander gespielt haben. Die Trennlinie markiert
|
||||
den Schnitt zwischen Platz 8 und 9.
|
||||
{dict.thirds.explanation}
|
||||
</p>
|
||||
<table className="third-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th><th>Gruppe</th><th>Team</th>
|
||||
<th>Sp</th><th>Pkt</th><th>±</th><th>Tore</th><th>Status</th>
|
||||
<th>{dict.table.rank}</th><th>{dict.table.group}</th><th>Team</th>
|
||||
<th>{dict.table.matches}</th><th>{dict.table.points}</th><th>{dict.table.goalDiff}</th><th>{dict.table.goals}</th><th>{dict.table.status}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -39,7 +37,7 @@ export default function ThirdPlace({
|
||||
<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>
|
||||
<span style={{ color: "var(--turf)", marginLeft: 6, fontSize: 13 }} title={dict.label.securelyQualified}>✓</span>
|
||||
)}
|
||||
</td>
|
||||
<td>{r.played}</td>
|
||||
@@ -48,7 +46,7 @@ export default function ThirdPlace({
|
||||
<td>{r.goalsFor}:{r.goalsAgainst}</td>
|
||||
<td>
|
||||
<span className={`qual-badge ${r.qualifies ? "yes" : "no"}`}>
|
||||
{r.qualifies ? "weiter" : "raus"}
|
||||
{r.qualifies ? dict.thirds.advances : dict.thirds.eliminated}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user