Lineups
Confirmed and predicted starting XIs, and the fifty lines of reshaping that turn two flat lists into one group per match.
/lineups · src/composed/lineups
Confirmed and predicted starting XIs for upcoming matches.
The grouping is the interesting part
The endpoint returns a flat list of players and a separate list of
events. Turning that into one FixtureGroup per match — home and away split,
each side ordered by position — is fifty lines of pure reshaping.
It had been sitting in the middle of the markup that consumed it, which is the usual reason a board is hard to change: the transformation and the rendering are interleaved, so neither can be read on its own and neither can be tested.
Pure reshaping belongs beside the query, not inside the JSX. Once it is out, it takes an API response and returns rows, and a fixture with a missing side or an unexpected position is a case you can write down rather than a render you have to reproduce.
Beside it on matchday
Fouls Alerts is the other board in
(matchday), and the two are usually open together before kick-off.