From dad06dd27d26f7ae18a39e35733a0a4df3e9d66a Mon Sep 17 00:00:00 2001 From: yuchenglong Date: Fri, 23 Jan 2026 13:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AF=94=E8=B5=9B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E5=92=8C=E7=BD=91=E7=90=83=E5=8A=9B?= =?UTF-8?q?=E9=87=8F=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/live-detail/[id].tsx | 48 ++++++++++++------- components/live-detail/tennis-power-graph.tsx | 8 ++-- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/app/live-detail/[id].tsx b/app/live-detail/[id].tsx index 907580c..cabe529 100644 --- a/app/live-detail/[id].tsx +++ b/app/live-detail/[id].tsx @@ -54,14 +54,14 @@ export default function LiveDetailScreen() { CreatedAt: "", UpdatedAt: "", DeletedAt: null, - eventKey: match.event_key.toString(), + eventKey: match.event_key?.toString() || "", eventDate: match.event_date, eventTime: match.event_time, eventHomeTeam: match.event_home_team, - homeTeamKey: match.home_team_key.toString(), + homeTeamKey: match.home_team_key?.toString() || "", homeTeamLogo: match.home_team_logo || "", eventAwayTeam: match.event_away_team, - awayTeamKey: match.away_team_key.toString(), + awayTeamKey: match.away_team_key?.toString() || "", awayTeamLogo: match.away_team_logo || "", eventHalftimeResult: match.event_halftime_result || "", eventFinalResult: match.event_final_result, @@ -70,7 +70,7 @@ export default function LiveDetailScreen() { eventStatus: match.event_status, countryName: match.country_name, leagueName: match.league_name, - leagueKey: match.league_key.toString(), + leagueKey: match.league_key?.toString() || "", leagueRound: match.league_round, leagueSeason: match.league_season, eventLive: match.event_live, @@ -92,16 +92,18 @@ export default function LiveDetailScreen() { eventManOfMatch: "", scores: match.scores, stats: match.statistics, - players: match.player_statistics ? { - home_team: (match.player_statistics.home_team || []).map(p => ({ - ...p, - player_oncourt: p.player_oncourt || undefined, - })), - away_team: (match.player_statistics.away_team || []).map(p => ({ - ...p, - player_oncourt: p.player_oncourt || undefined, - })), - } : undefined, + players: match.player_statistics + ? { + home_team: (match.player_statistics.home_team || []).map((p) => ({ + ...p, + player_oncourt: p.player_oncourt || undefined, + })), + away_team: (match.player_statistics.away_team || []).map((p) => ({ + ...p, + player_oncourt: p.player_oncourt || undefined, + })), + } + : undefined, }, }; }, [match, sport_id]); @@ -134,7 +136,7 @@ export default function LiveDetailScreen() { if (liveData && Array.isArray(liveData)) { const found = liveData.find((m) => m.event_key.toString() === id); - console.log("found", JSON.stringify(found, null, 2)); + // console.log("found", JSON.stringify(found, null, 2)); if (found) { setMatch(found); } @@ -176,9 +178,16 @@ export default function LiveDetailScreen() { if (numericSportId === 2 && convertToMatchDetailData) { switch (activeTab) { case "stats": - return ; + return ( + + ); case "overall": - return ; + return ( + + ); case "odds": return ( @@ -186,7 +195,10 @@ export default function LiveDetailScreen() { case "detail": return ( <> - + ); default: diff --git a/components/live-detail/tennis-power-graph.tsx b/components/live-detail/tennis-power-graph.tsx index a29f450..f5751bb 100644 --- a/components/live-detail/tennis-power-graph.tsx +++ b/components/live-detail/tennis-power-graph.tsx @@ -110,7 +110,8 @@ export function TennisPowerGraph({ match, isDark }: TennisPowerGraphProps) { {/* Sidebar - Avatars */} - {/* Spacer top */} + {/* Spacer top */} + {p1Logo ? ( @@ -118,7 +119,7 @@ export function TennisPowerGraph({ match, isDark }: TennisPowerGraphProps) { )} - {" "} + {/* Gap corresponding to center line if needed, but styling is easier with even spacing */} {p2Logo ? ( @@ -127,7 +128,8 @@ export function TennisPowerGraph({ match, isDark }: TennisPowerGraphProps) { )} - {/* Spacer bottom */} + {/* Spacer bottom */} + {/* Scrollable Graph */}