Files
SixFlagsSuperCalendar/components/MobileCardList.tsx
Josh Wright cba8218fe8
All checks were successful
Build and Deploy / Build & Push (push) Successful in 51s
feat: replace dot with left border line on park rows/cards
Open parks get a colored left border (green/amber/blue) instead of a dot.
Region headers lose their accent line; distinguished by "— REGION —" format
with higher-contrast text instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 15:07:42 -04:00

63 lines
2.0 KiB
TypeScript

import type { Park } from "@/lib/scrapers/types";
import type { DayData } from "@/lib/db";
import type { Region } from "@/lib/parks";
import { ParkCard } from "./ParkCard";
interface MobileCardListProps {
grouped: Map<Region, Park[]>;
weekDates: string[];
data: Record<string, Record<string, DayData>>;
today: string;
rideCounts?: Record<string, number>;
coastersOnly?: boolean;
openParkIds?: string[];
closingParkIds?: string[];
weatherDelayParkIds?: string[];
}
export function MobileCardList({ grouped, weekDates, data, today, rideCounts, coastersOnly, openParkIds, closingParkIds, weatherDelayParkIds }: MobileCardListProps) {
return (
<div style={{ display: "flex", flexDirection: "column", gap: 20, paddingTop: 14 }}>
{Array.from(grouped.entries()).map(([region, parks]) => (
<div key={region} data-region={region}>
{/* Region heading */}
<div style={{
display: "flex",
alignItems: "center",
marginBottom: 10,
paddingLeft: 2,
}}>
<span style={{
fontSize: "0.6rem",
fontWeight: 700,
letterSpacing: "0.14em",
textTransform: "uppercase",
color: "var(--color-text-secondary)",
}}>
{region}
</span>
</div>
{/* Park cards */}
<div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
{parks.map((park) => (
<ParkCard
key={park.id}
park={park}
weekDates={weekDates}
parkData={data[park.id] ?? {}}
today={today}
openRideCount={rideCounts?.[park.id]}
coastersOnly={coastersOnly}
isOpen={openParkIds?.includes(park.id)}
isClosing={closingParkIds?.includes(park.id)}
isWeatherDelay={weatherDelayParkIds?.includes(park.id)}
/>
))}
</div>
</div>
))}
</div>
);
}