import { Link } from 'react-router-dom' import PublicLayout from '../../components/PublicLayout.jsx' import PageHeader from '../../components/PageHeader.jsx' import { Loading, ErrorState } from '../../components/PageState.jsx' import { useAsync } from '../../lib/useAsync.js' import { useShardFeed } from '../../lib/useShardFeed.js' import { describe } from '../../lib/shardEvents.js' import { ago } from '../../lib/format.js' import { api } from '../../api/client.js' import PlayersOnline from '../../components/PlayersOnline.jsx' // ── Gold-supply sparkline ─────────────────────────────────────────────────── function Sparkline({ series }) { if (!series || series.length < 2) return null const w = 320 const h = 56 const golds = series.map((s) => Number(s.gold) || 0) const min = Math.min(...golds) const max = Math.max(...golds) const span = max - min || 1 const pts = series .map((s, i) => { const x = (i / (series.length - 1)) * w const y = h - ((Number(s.gold) || 0) - min) / span * h return `${x.toFixed(1)},${y.toFixed(1)}` }) .join(' ') return ( ) } // ── Stat tile (matches Status.jsx) ────────────────────────────────────────── function Stat({ value, label }) { return (
No staff are online right now.
) : (Waiting for something to happen in the world…
) : ({empty}
) : (