mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
fix(frontend): restore pit-stop markers on strategy stint timeline (#45)
Wire Race Hub pit_stops into TyreStintTimeline via optional per-row pitStops laps; render vertical markers at stint boundaries with driver/lap tooltips. Matches pre-extraction positioning ((lap-1)/totalLaps). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,7 +12,7 @@ interface Props {
|
||||
hasStints: boolean
|
||||
}
|
||||
|
||||
export function StrategyView({ results, stints, pit_stops: _pitStops, hasStints }: Props) {
|
||||
export function StrategyView({ results, stints, pit_stops, hasStints }: Props) {
|
||||
if (!hasStints) {
|
||||
return (
|
||||
<div>
|
||||
@@ -88,6 +88,10 @@ export function StrategyView({ results, stints, pit_stops: _pitStops, hasStints
|
||||
lapEnd: s.lap_end,
|
||||
isNew: s.tyre_age_at_start === 0,
|
||||
})),
|
||||
pitStops: pit_stops
|
||||
.filter((p) => p.driver_number === driver.driver_number)
|
||||
.map((p) => p.lap_number)
|
||||
.sort((a, b) => a - b),
|
||||
}))
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user