mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 06:26:26 +00:00
e2dab1aebb
TripSummary leaves RoadtripSidebar.tsx for its own module and is imported back by name; Unit and splitValue go with it unexported. The day card's header becomes DayHeader in the same module. Its body is the header element the card drew inline, together with the reads only the header used: the language, the distance unit, the clock format, the missed ride and the day colour. The card keeps its translation and passes the day, the fold state and the track details straight through. DayHeader returns the bare header with nothing around it, so the markup is unchanged, and it sits at module scope so it never remounts. The code moves as it was otherwise, with the dashes in the moved comments rewritten as colons and commas, and the imports only these two used leave the sidebar, which is down to about 700 lines. Nothing renders differently. New tests render both on their own: the summary's figures split from their units, narrow and still loading; the day's facts and its fold control; a day over the driving limit, roads it could not avoid, a missed flight, the track badge with and without its name, and the wash in the day's own colour.