Elo trajectories: a century of strength on every team page

buildRatings samples each WC team's rating along the full walk (yearly
historically, monthly since 2022) into elohistory.json (~72KB, 48
teams). Team pages plot it as a clean SVG line with year and rating
gridlines — Germany's century, 1908 → today, in one glance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 01:12:36 +02:00
parent f58d6566fb
commit 047e9f8767
6 changed files with 108 additions and 0 deletions
+8
View File
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react';
import { Link, useParams } from '@tanstack/react-router';
import { ArrowLeft, Shield, Star } from 'lucide-react';
import { EloHistoryChart } from '@/components/EloHistoryChart';
import { useFavoriteStore } from '@/stores/favoriteStore';
import { Card, CardBody, CardHeader } from '@/components/ui/Card';
import { Badge } from '@/components/ui/Badge';
@@ -101,6 +102,13 @@ export function TeamProfilePage() {
</CardBody>
</Card>
<Card>
<CardHeader><span className="font-display font-bold text-ink">{t.team.eloHistory}</span></CardHeader>
<CardBody>
<EloHistoryChart team={profile.team} />
</CardBody>
</Card>
<div className="grid gap-5 md:grid-cols-[1.3fr_1fr]">
<Card>
<CardHeader><span className="font-display font-bold text-ink">{t.team.fixtures}</span></CardHeader>