feat: hide parks with no open days in the current week
Some checks failed
Build and Deploy / Build & Push (push) Has been cancelled

Header subtitle now shows "X of 24 parks open" for context.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 11:00:53 -04:00
parent 91e09b0548
commit e2d90b3c5b

View File

@@ -45,6 +45,11 @@ export default async function HomePage({ searchParams }: PageProps) {
0 0
); );
// Only show parks that have at least one open day this week
const visibleParks = PARKS.filter((park) =>
weekDates.some((date) => data[park.id]?.[date]?.isOpen)
);
return ( return (
<div style={{ minHeight: "100vh", background: "var(--color-bg)" }}> <div style={{ minHeight: "100vh", background: "var(--color-bg)" }}>
{/* Header */} {/* Header */}
@@ -65,7 +70,7 @@ export default async function HomePage({ searchParams }: PageProps) {
Six Flags Calendar Six Flags Calendar
</span> </span>
<span style={{ fontSize: "0.75rem", color: "var(--color-text-muted)" }}> <span style={{ fontSize: "0.75rem", color: "var(--color-text-muted)" }}>
{PARKS.length} parks {visibleParks.length} of {PARKS.length} parks open
</span> </span>
</div> </div>
@@ -79,7 +84,7 @@ export default async function HomePage({ searchParams }: PageProps) {
{scrapedCount === 0 ? ( {scrapedCount === 0 ? (
<EmptyState /> <EmptyState />
) : ( ) : (
<WeekCalendar parks={PARKS} weekDates={weekDates} data={data} /> <WeekCalendar parks={visibleParks} weekDates={weekDates} data={data} />
)} )}
</main> </main>
</div> </div>