Files
lokiloto/components/lottery-results-panel.tsx
T
Nazim KriandClaude Sonnet 5 fc69d4a668 Rebuild layout per Codex's design review: sidebar nav, shared results panel
Codex (independent /codex consult) reviewed the prior card-grid layout
and called it an unstructured "starter dashboard" look: too much chrome
before the data, duplicated card containers competing for attention,
community size outweighing actual draw results, and a real bug —
CardHeader's base class is `grid`, so the `flex-row` override on
LotteryCard never applied.

Rebuilds around a shared data panel instead of isolated cards:
- CountryNav: 200px sidebar (desktop) / horizontal scroller (mobile),
  replacing pill-tab filters that read as tags rather than navigation
- LotteryResultsPanel + LotteryRow: one table-like panel with column
  headers (Loterie / Résultat / Choix / Score / Historique), not N
  separate bordered cards — makes draws directly comparable
- LotteryMobileCard: dedicated compact mobile layout, not a shrunk
  desktop row
- NumberSequence: shared ball component used by both layouts
- --success token, independent of --accent: a winning number is always
  green, never the country's accent color (previously a win in France
  would render in France's red, which reads as a loss)
- --primary now stays neutral, decoupled from --accent, so generic
  shadcn control states don't inherit a country's color as if it meant
  something semantically
- New surface/text palette (page/header/panel/divider tiers) replacing
  the flat near-black scale
- Redrawn LokiMark: clearer two-ear fox silhouette, legible at 20-24px

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-29 22:34:16 -04:00

30 lines
1.1 KiB
TypeScript

import { LotteryRow } from "@/components/lottery-row"
import { LotteryMobileCard } from "@/components/lottery-mobile-card"
import type { LotteryFeedEntry } from "@/lib/lokilab-feed"
export function LotteryResultsPanel({ lotteries }: { lotteries: LotteryFeedEntry[] }) {
return (
<div className="overflow-hidden rounded-md border border-border/60 bg-panel">
<div className="hidden sm:grid grid-cols-[160px_1fr_1fr_72px_120px] gap-3 border-b border-border/60 px-3 py-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">
<span>Loterie</span>
<span>Résultat officiel</span>
<span>Choix de Loki</span>
<span className="text-right">Score</span>
<span className="text-right">Historique</span>
</div>
<div className="hidden sm:block">
{lotteries.map((entry) => (
<LotteryRow key={entry.id} entry={entry} />
))}
</div>
<div className="sm:hidden">
{lotteries.map((entry) => (
<LotteryMobileCard key={entry.id} entry={entry} />
))}
</div>
</div>
)
}