Stateful donation-train view — mirrors the overlay's
useDonationTrains.ts byte-for-byte so the overlay can eventually
collapse to a re-export of this hook.
Composition:
useDonationTrains (query) drives the baseline train list.
useDonationTrainHighRateDonors + useDonationTrainCommonTrains
expose the two stats surfaces.
useEffect on donations POSTs to process-donations/ and
folds the response into local state (updated in place, new
ACTIVE/PENDING/ENDING trains prepended).
updateTrainStatus / updateTrainVisibility fire one-shot
fetches and swap the matching train in local state on success.
Stateful donation-train view — mirrors the overlay's
useDonationTrains.tsbyte-for-byte so the overlay can eventually collapse to a re-export of this hook.Composition:
useDonationTrains(query) drives the baseline train list.useDonationTrainHighRateDonors+useDonationTrainCommonTrainsexpose the two stats surfaces.useEffectondonationsPOSTs toprocess-donations/and folds the response into local state (updated in place, new ACTIVE/PENDING/ENDING trains prepended).updateTrainStatus/updateTrainVisibilityfire one-shot fetches and swap the matching train in local state on success.