feat: double-tap refresh at park opening — mark open, then fetch ride counts
All checks were successful
Build and Deploy / Build & Push (push) Successful in 50s
All checks were successful
Build and Deploy / Build & Push (push) Successful in 50s
Fire two refreshes per park: one at opening time to flip the open indicator, and one 30s later to pick up queue-times ride counts once the API updates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,8 @@ export function HomePageClient({
|
|||||||
const ms = msUntilLocalTime(openTime.hour, openTime.minute, park.timezone);
|
const ms = msUntilLocalTime(openTime.hour, openTime.minute, park.timezone);
|
||||||
// Only schedule if opening is still in the future (within the next 24h)
|
// Only schedule if opening is still in the future (within the next 24h)
|
||||||
if (ms > 0 && ms < 24 * 60 * 60 * 1000) {
|
if (ms > 0 && ms < 24 * 60 * 60 * 1000) {
|
||||||
timeouts.push(setTimeout(() => router.refresh(), ms + OPEN_REFRESH_BUFFER_MS));
|
timeouts.push(setTimeout(() => router.refresh(), ms)); // mark as open
|
||||||
|
timeouts.push(setTimeout(() => router.refresh(), ms + OPEN_REFRESH_BUFFER_MS)); // pick up ride counts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user