From 7ec05878fde43c757c12243fb4efff1ecaa392ff Mon Sep 17 00:00:00 2001 From: yuchenglong Date: Wed, 21 Jan 2026 11:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20MatchCard=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E7=AE=80=E5=8C=96=E8=B5=94=E7=8E=87=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=A0=E4=BD=8D=E7=AC=A6=E4=BB=A5=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/match-card.tsx | 119 ++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/components/match-card.tsx b/components/match-card.tsx index 0b927b8..a7ce83a 100644 --- a/components/match-card.tsx +++ b/components/match-card.tsx @@ -275,7 +275,8 @@ export function MatchCard({ if (!oddsSettings.enabled || !bookmakerName) return null; const item = odds.find((o) => o.odd_bookmakers === bookmakerName); - const hasOdds = !!item; + // 如果没有找到该博彩公司的赔率数据,直接返回 null,不进行占位 + if (!item) return null; const val1 = item?.odd_1 || item?.ah0_1 || "-"; const val2 = item?.odd_x || "0" || "-"; @@ -283,45 +284,39 @@ export function MatchCard({ return ( - {hasOdds ? ( - <> - - - {val1} - - - - - {val2} - - - - - {val3} - - - - ) : ( - - )} + + + {val1} + + + + + {val2} + + + + + {val3} + + ); }; @@ -388,13 +383,15 @@ export function MatchCard({ - {match.homeTeamLogo && ( + - )} + - {match.awayTeamLogo && ( + - )} + - - {scoreParts.hasScore ? ( + {scoreParts.hasScore ? ( + - ) : ( + + ) : ( + - )} - + + )} - - {extraStats.home !== "" || extraStats.away !== "" ? ( + {extraStats.home !== "" || extraStats.away !== "" ? ( + {extraStats.home} @@ -496,8 +497,10 @@ export function MatchCard({ {extraStats.away} - ) : null} - + + ) : ( + + )}