locale second stage
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
|
||||
import { useMemo } from "react";
|
||||
import { Match, Team } from "@/lib/types";
|
||||
import { Dictionary } from "@/lib/i18n";
|
||||
import { computeGroupTables, computeThirdPlaceTable } from "@/lib/standings";
|
||||
import { qualifiedThirdGroups, resolveAnnexC, LATER_ROUNDS } from "@/lib/bracket";
|
||||
import { resolveBracket, ResolvedTie } from "@/lib/resolve-bracket";
|
||||
import { buildSimMatches } from "@/lib/simulation";
|
||||
import Bracket from "./Bracket";
|
||||
|
||||
export default function Simulation({ teams, matches }: { teams: Team[]; matches: Match[] }) {
|
||||
export default function Simulation({ teams, matches, dict, locale }: { teams: Team[]; matches: Match[]; dict: Dictionary; locale: string }) {
|
||||
// ---- Simulations-Pipeline (Polymarket-Defaults, keine manuellen Overrides) ----
|
||||
const simMatches = useMemo(() => buildSimMatches(matches, {}), [matches]);
|
||||
const simTables = useMemo(() => computeGroupTables(teams, simMatches), [teams, simMatches]);
|
||||
@@ -21,8 +22,8 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
|
||||
const simAnnexResolved = simAnnex != null;
|
||||
|
||||
const simBracket = useMemo(
|
||||
() => resolveBracket(simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, true),
|
||||
[simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved],
|
||||
() => resolveBracket(simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, true, dict),
|
||||
[simMatches, teams, simTables, simThirds, simAnnex, simAnnexResolved, dict],
|
||||
);
|
||||
|
||||
// Echte Tabellen/Bracket für fix/provisional-Flags (nur tatsächlich FINISHED).
|
||||
@@ -34,8 +35,8 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
|
||||
[realQGroups],
|
||||
);
|
||||
const realBracket = useMemo(
|
||||
() => resolveBracket(matches, teams, realTables, realThirds, realAnnex, realAnnex != null),
|
||||
[matches, teams, realTables, realThirds, realAnnex],
|
||||
() => resolveBracket(matches, teams, realTables, realThirds, realAnnex, realAnnex != null, undefined, dict),
|
||||
[matches, teams, realTables, realThirds, realAnnex, dict],
|
||||
);
|
||||
|
||||
// R32: provisional-Flags aus dem echten Bracket übernehmen.
|
||||
@@ -95,12 +96,11 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
|
||||
return (
|
||||
<div>
|
||||
<div className="notice" style={{ marginBottom: 20 }}>
|
||||
Simulation — alle ungespielten Spiele sind mit dem Polymarket-Favoriten
|
||||
vorbelegt. Die angezeigten Wahrscheinlichkeiten stammen von Polymarket.
|
||||
{dict.sim.notice}
|
||||
</div>
|
||||
|
||||
<h3 style={{ fontFamily: "var(--font-display)", fontSize: 15, textTransform: "uppercase", letterSpacing: "0.06em", color: "var(--ink-dim)", margin: "0 0 12px" }}>
|
||||
Simulierter K.o.-Baum
|
||||
{dict.sim.heading}
|
||||
</h3>
|
||||
<Bracket
|
||||
matches={simMatches}
|
||||
@@ -110,6 +110,8 @@ export default function Simulation({ teams, matches }: { teams: Team[]; matches:
|
||||
assignment={simAnnex}
|
||||
annexResolved={simAnnexResolved}
|
||||
preResolved={preResolved}
|
||||
dict={dict}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user