mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
- Track status flag banner (green/yellow/SC/VSC/red, defensive mapping) - Weather strip: air/track temp, humidity, wind with compass, rain badge - Gap trend sparklines from a per-driver interval ring buffer - Battle detection: consecutive cars within 1.0s chained and highlighted - Stint history column with compound sequence per driver - Pinnable drivers (max 3) with focus cards, persisted to localStorage Pure logic lives in lib/gapHistory.ts and lib/battles.ts with unit tests; 137 frontend tests passing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
570 B
TypeScript
22 lines
570 B
TypeScript
import type { Battle } from '../../lib/battles'
|
|
import { battleLabel } from '../../lib/battles'
|
|
|
|
interface Props {
|
|
battles: Battle[]
|
|
}
|
|
|
|
export function BattleChips({ battles }: Props) {
|
|
if (battles.length === 0) return null
|
|
|
|
return (
|
|
<div className="battle-chips" data-testid="battle-chips">
|
|
<span className="battle-chips-label">Battles</span>
|
|
{battles.map((battle) => (
|
|
<span className="battle-chip mono" key={battle.drivers.map((d) => d.racingNumber).join('-')}>
|
|
{battleLabel(battle)}
|
|
</span>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|