From f1b5328b78bff20fa7e468ca222e3ba715dc7bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 14 Jun 2026 20:26:49 +0200 Subject: [PATCH] fix: switch team table and confederation stats to proper table layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Team table: overflow-x-auto wrapper + min-w-[560px] so flags and names never collapse; columns are right-aligned numeric data, left-aligned team. Confederation: replace CSS grid with — browser handles column alignment automatically, no more misalignment between header and rows. Co-Authored-By: Claude Sonnet 4.6 --- app/stats/page.tsx | 98 ++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/app/stats/page.tsx b/app/stats/page.tsx index e24472f..848c122 100644 --- a/app/stats/page.tsx +++ b/app/stats/page.tsx @@ -290,19 +290,26 @@ export default function StatsPage() {
🌍 Performance by Confederation -
- ConfederationAppearancesTitlesGoals -
- {confStats.map(c => ( -
- {c.confederation} - {c.appearances} - {c.titles} - {c.totalGoals} -
- ))} +
+ + + + + + + + + + {confStats.map(c => ( + + + + + + + ))} + +
ConfederationAppearancesTitlesGoals
{c.confederation}{c.appearances}{c.titles}{c.totalGoals}
)} @@ -312,37 +319,42 @@ export default function StatsPage() {
📊 All-Time Team Table -
- #TeamWC - WDL - GFGAGD - Win% +
+ + + + {['#', 'Team', 'WC', 'W', 'D', 'L', 'GF', 'GA', 'GD', 'Win%'].map((h, i) => ( + + ))} + + + + {teams.slice(0, 40).map((t, i) => ( + + + + + + + + + + + + + ))} + +
{h}
{i + 1} + + + {t.name} + + {t.stats?.appearances}{t.stats?.wins}{t.stats?.draws}{t.stats?.losses}{t.stats?.goalsFor}{t.stats?.goalsAgainst} + {(t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0) >= 0 + ? `+${(t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0)}` + : (t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0)} + {t.stats?.winPct}%
- {teams.slice(0, 40).map((t, i) => ( - -
- {i + 1} -
- - {t.name} -
- {t.stats?.appearances} - {t.stats?.wins} - {t.stats?.draws} - {t.stats?.losses} - {t.stats?.goalsFor} - {t.stats?.goalsAgainst} - - {(t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0) >= 0 - ? `+${(t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0)}` - : (t.stats?.goalsFor ?? 0) - (t.stats?.goalsAgainst ?? 0)} - - {t.stats?.winPct}% -
- - ))}
)}