fix: Live Courts data structure and status naming

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-03-03 23:26:21 +00:00
parent da8a730867
commit 7d0d6d32f1
2 changed files with 30 additions and 10 deletions

View File

@@ -135,7 +135,7 @@ export default function LiveCourtsPage() {
const response = await fetch(url);
if (!response.ok) throw new Error("Failed to load court data");
const data = await response.json();
setCourts(data.courts ?? data.data ?? []);
setCourts(Array.isArray(data) ? data : data.courts ?? data.data ?? []);
setLastUpdated(new Date());
} catch (err) {
console.error("Live courts fetch error:", err);