From 1246c8382c8734dc705f96bf9fa6b5efdd3819bc Mon Sep 17 00:00:00 2001
From: yyamashita <yyamashita@mosquit.one>
Date: Fri, 8 May 2026 08:38:32 +0900
Subject: Fix all TODO bugs and implement feature additions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- 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>
---
 app/routes/venues.tsx | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

(limited to 'app/routes/venues.tsx')

diff --git a/app/routes/venues.tsx b/app/routes/venues.tsx
index b027707..f2a7d54 100644
--- a/app/routes/venues.tsx
+++ b/app/routes/venues.tsx
@@ -1,6 +1,7 @@
 import { useLoaderData, Link } from "react-router";
 import type { Route } from "./+types/venues";
 import { getVenues, getLastScrapePerVenue, type ScrapeLog } from "~/lib/db.server";
+import ScrapeButton from "~/components/ScrapeButton";
 
 export async function loader(_: Route.LoaderArgs) {
   const venues = getVenues();
@@ -20,16 +21,20 @@ export default function Venues() {
         </Link>
         <nav className="flex gap-4 sm:gap-6 text-sm text-gray-400">
           <Link to="/events" className="hover:text-white transition-colors">イベント</Link>
+          <Link to="/events/by-date" className="hover:text-white transition-colors">日付別</Link>
           <Link to="/venues" className="text-white font-medium">会場一覧</Link>
         </nav>
       </header>
 
       <main className="max-w-4xl mx-auto px-4 py-10">
-        <div className="mb-8">
-          <h1 className="text-2xl font-bold">会場一覧</h1>
-          <p className="mt-1 text-sm text-gray-400">
-            現在 {venues.length} 会場が登録されています。
-          </p>
+        <div className="mb-8 flex items-start justify-between gap-4">
+          <div>
+            <h1 className="text-2xl font-bold">会場一覧</h1>
+            <p className="mt-1 text-sm text-gray-400">
+              現在 {venues.length} 会場が登録されています。
+            </p>
+          </div>
+          <ScrapeButton />
         </div>
 
         {venues.length === 0 ? (
@@ -51,7 +56,19 @@ export default function Venues() {
                     >
                       {v.name}
                     </Link>
-                    {v.area && <p className="text-xs text-gray-400">{v.area}</p>}
+                    <div className="flex items-center gap-2 mt-0.5">
+                      {v.area && <span className="text-xs text-gray-400">{v.area}</span>}
+                      {v.url && (
+                        <a
+                          href={v.url}
+                          target="_blank"
+                          rel="noopener noreferrer"
+                          className="text-xs text-gray-600 hover:text-indigo-400 transition-colors"
+                        >
+                          公式サイト ↗
+                        </a>
+                      )}
+                    </div>
                   </div>
 
                   {/* イベント件数 */}
-- 
cgit v1.2.3

