Every tick either shows the next eligible donation (for the
DonorLevel duration derived from donation.amount.value)
or waits idleCheckIntervalMs before checking again.
Donations below minDonation are consumed but never surfaced
— keeps the queue clean without emitting an alert.
A short interAlertGapMs gap is inserted after each alert to
give the UI a moment to un-mount before the next alert appears.
The hook keeps getMostRecentDonation / consumeDonation /
minDonation in refs so it doesn't tear down the timing loop on
every render — callers can pass fresh closures without stampeding.
Alert-queue display processor. Pulls donations off an external queue via UseAlertsQueueParams.getMostRecentDonation / UseAlertsQueueParams.consumeDonation, gates them on UseAlertsQueueParams.minDonation, and drives the display timing via a self-scheduling
setTimeoutchain (nosetInterval, no shared timers).behavior:
donation.amount.value) or waitsidleCheckIntervalMsbefore checking again.minDonationare consumed but never surfaced — keeps the queue clean without emitting an alert.interAlertGapMsgap is inserted after each alert to give the UI a moment to un-mount before the next alert appears.The hook keeps
getMostRecentDonation/consumeDonation/minDonationin refs so it doesn't tear down the timing loop on every render — callers can pass fresh closures without stampeding.