Files
SixFlagsSuperCalendar/components/MobileCardList.tsx
josh d4c8046515
All checks were successful
Build and Deploy / Build & Push (push) Successful in 3m24s
improve: redesign mobile card layout for usability
Replace the cramped 7-column day grid with a clean open-days list.
Each card now shows:
- Park name + "Open today" / "Closed today" badge in the header
- One row per open day (Today, Monday, Friday...) with full hours
- Today row highlighted in amber; passholder days labeled inline
- Whole card is a tap target linking to the park detail page

Also:
- Hide the legend below sm breakpoint (not needed on phones)
- Reduce horizontal padding to 16px on mobile (was 24px)
- Tighten MobileCardList vertical spacing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:33:02 -04:00

61 lines
1.7 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;
}
export function MobileCardList({ grouped, weekDates, data, today }: 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",
gap: 10,
marginBottom: 10,
paddingLeft: 2,
}}>
<div style={{
width: 3,
height: 14,
borderRadius: 2,
background: "var(--color-region-accent)",
flexShrink: 0,
}} />
<span style={{
fontSize: "0.65rem",
fontWeight: 700,
letterSpacing: "0.1em",
textTransform: "uppercase",
color: "var(--color-text-muted)",
}}>
{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}
/>
))}
</div>
</div>
))}
</div>
);
}