feat: show open dot based on hours, Weather Delay when queue-times shows 0 rides
All checks were successful
Build and Deploy / Build & Push (push) Successful in 49s
All checks were successful
Build and Deploy / Build & Push (push) Successful in 49s
Park open indicator now derives from scheduled hours, not ride counts. Parks with queue-times coverage but 0 open rides (e.g. storm) show a "⛈ Weather Delay" notice instead of a ride count on both desktop and mobile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,14 @@ interface ParkCardProps {
|
||||
today: string;
|
||||
openRideCount?: number;
|
||||
coastersOnly?: boolean;
|
||||
isOpen?: boolean;
|
||||
isClosing?: boolean;
|
||||
isWeatherDelay?: boolean;
|
||||
}
|
||||
|
||||
const DOW = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
||||
|
||||
export function ParkCard({ park, weekDates, parkData, today, openRideCount, coastersOnly, isClosing }: ParkCardProps) {
|
||||
export function ParkCard({ park, weekDates, parkData, today, openRideCount, coastersOnly, isOpen, isClosing, isWeatherDelay }: ParkCardProps) {
|
||||
const openDays = weekDates.filter((d) => parkData[d]?.isOpen && parkData[d]?.hoursLabel);
|
||||
const tzAbbr = getTimezoneAbbr(park.timezone);
|
||||
const isOpenToday = openDays.includes(today);
|
||||
@@ -87,6 +89,16 @@ export function ParkCard({ park, weekDates, parkData, today, openRideCount, coas
|
||||
Closed today
|
||||
</div>
|
||||
)}
|
||||
{isOpenToday && isWeatherDelay && (
|
||||
<div style={{
|
||||
fontSize: "0.65rem",
|
||||
color: "var(--color-text-muted)",
|
||||
fontWeight: 500,
|
||||
textAlign: "right",
|
||||
}}>
|
||||
⛈ Weather Delay
|
||||
</div>
|
||||
)}
|
||||
{isOpenToday && openRideCount !== undefined && (
|
||||
<div style={{
|
||||
fontSize: "0.65rem",
|
||||
|
||||
Reference in New Issue
Block a user