feat: park page operating window check; always show ride total
All checks were successful
Build and Deploy / Build & Push (push) Successful in 5m54s

- Extract isWithinOperatingWindow() to lib/env.ts (shared)
- Park detail page: always fetch Queue-Times, but force all rides
  closed when outside the ±1h operating window
- LiveRidePanel: always show closed ride count badge (not just when
  some rides are also open); label reads "X rides total" when none
  are open vs "X closed / down" when some are

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 20:43:33 -04:00
parent 8e969165b4
commit fbf4337a83
4 changed files with 44 additions and 29 deletions

View File

@@ -57,8 +57,8 @@ export function LiveRidePanel({ liveRides, parkOpenToday }: LiveRidePanelProps)
</div>
)}
{/* Closed count badge */}
{anyOpen && closedRides.length > 0 && (
{/* Closed count badge — always shown when there are closed rides */}
{closedRides.length > 0 && (
<div style={{
background: "var(--color-surface)",
border: "1px solid var(--color-border)",
@@ -69,7 +69,7 @@ export function LiveRidePanel({ liveRides, parkOpenToday }: LiveRidePanelProps)
color: "var(--color-text-muted)",
flexShrink: 0,
}}>
{closedRides.length} closed / down
{closedRides.length} {anyOpen ? "closed / down" : "rides total"}
</div>
)}