diff options
| author | yyamashita <yyamashita@mosquit.one> | 2026-05-08 08:38:32 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@mosquit.one> | 2026-05-08 08:38:32 +0900 |
| commit | 1246c8382c8734dc705f96bf9fa6b5efdd3819bc (patch) | |
| tree | cc840910f942aace0f21f3550151e95d08dafcf2 /app/components/FilterBar.tsx | |
| parent | 6579d8423bdeeca0e6b11df5410051c0aaed5d16 (diff) | |
Fix all TODO bugs and implement feature additions
- SCRAPE_TARGETS.md: add 5 missing venues (nine-spices, nishieifuku-jam,
fever-shindaita, moon-step-nakano, mod-shibasaki)
- Navigation: add 日付別 link to venues.tsx and events.$id.tsx headers
- venues.tsx: add official site external links per venue card
- ScrapeButton: new component with useFetcher-based trigger + 2s polling
progress UI showing per-venue status and event count
- venues.tsx / events._index.tsx: wire in ScrapeButton
- FilterBar + db.server.ts: add area filter derived from venues, threaded
through queryEvents
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/components/FilterBar.tsx')
| -rw-r--r-- | app/components/FilterBar.tsx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/app/components/FilterBar.tsx b/app/components/FilterBar.tsx index 7b8ca0c..7a95d2c 100644 --- a/app/components/FilterBar.tsx +++ b/app/components/FilterBar.tsx @@ -3,11 +3,12 @@ import type { Venue } from "~/lib/db.server"; interface Props { venues: Venue[]; + areas?: string[]; defaultDateFrom?: string; defaultDateTo?: string; } -export default function FilterBar({ venues, defaultDateFrom, defaultDateTo }: Props) { +export default function FilterBar({ venues, areas, defaultDateFrom, defaultDateTo }: Props) { const [searchParams] = useSearchParams(); return ( @@ -63,6 +64,25 @@ export default function FilterBar({ venues, defaultDateFrom, defaultDateTo }: Pr /> </div> + {/* Area */} + {areas && areas.length > 0 && ( + <div className="flex flex-col gap-1"> + <label className="text-xs text-gray-400">エリア</label> + <select + name="area" + defaultValue={searchParams.get("area") ?? ""} + className="rounded-md bg-gray-800 border border-gray-700 px-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-indigo-500" + > + <option value="">すべて</option> + {areas.map((a) => ( + <option key={a} value={a}> + {a} + </option> + ))} + </select> + </div> + )} + {/* Capacity */} <div className="flex flex-col gap-1"> <label className="text-xs text-gray-400">キャパシティ</label> @@ -98,5 +118,5 @@ export default function FilterBar({ venues, defaultDateFrom, defaultDateTo }: Pr } function hasFilters(params: URLSearchParams): boolean { - return ["keyword", "venue_id", "date_from", "date_to", "capacity_range"].some((k) => params.get(k)); + return ["keyword", "venue_id", "date_from", "date_to", "capacity_range", "area"].some((k) => params.get(k)); } |
