fix: restore arrow key week navigation; improve empty state copy
All checks were successful
Build and Deploy / Build & Push (push) Successful in 1m6s

- WeekNav: add keydown listener for ArrowLeft/ArrowRight week nav
- EmptyState: replace dev-facing "No data scraped yet" + npm commands
  with customer-friendly "Schedule not available yet" message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 20:07:43 -04:00
parent 6bb35d468f
commit fdea8443fb
2 changed files with 14 additions and 13 deletions

View File

@@ -10,21 +10,11 @@ export function EmptyState() {
color: "var(--color-text-muted)", color: "var(--color-text-muted)",
}}> }}>
<div style={{ fontSize: "2rem" }}>📅</div> <div style={{ fontSize: "2rem" }}>📅</div>
<div style={{ fontSize: "1rem", fontWeight: 600, color: "var(--color-text)" }}>No data scraped yet</div> <div style={{ fontSize: "1rem", fontWeight: 600, color: "var(--color-text)" }}>Schedule not available yet</div>
<div style={{ fontSize: "0.85rem", textAlign: "center", lineHeight: 1.6 }}> <div style={{ fontSize: "0.85rem", textAlign: "center", lineHeight: 1.6 }}>
Run the following to populate the calendar: Park hours for this period haven&apos;t been published yet.<br />
Check back closer to your visit.
</div> </div>
<pre style={{
background: "var(--color-surface)",
border: "1px solid var(--color-border)",
borderRadius: 8,
padding: "12px 20px",
fontSize: "0.8rem",
color: "var(--color-text)",
lineHeight: 1.8,
}}>
npm run discover{"\n"}npm run scrape
</pre>
</div> </div>
); );
} }

View File

@@ -1,5 +1,6 @@
"use client"; "use client";
import { useEffect } from "react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
interface WeekNavProps { interface WeekNavProps {
@@ -35,6 +36,16 @@ export function WeekNav({ weekStart, weekDates, isCurrentWeek }: WeekNavProps) {
const nav = (delta: number) => const nav = (delta: number) =>
router.push(`/?week=${shiftWeek(weekStart, delta)}`); router.push(`/?week=${shiftWeek(weekStart, delta)}`);
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
if (e.key === "ArrowLeft") nav(-1);
if (e.key === "ArrowRight") nav(1);
};
window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey);
}, [weekStart]);
return ( return (
<div style={{ display: "flex", alignItems: "center", gap: 8 }}> <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
<button <button