板球直播详情基本信息

This commit is contained in:
yuchenglong
2026-01-23 17:55:50 +08:00
parent b1a8797567
commit 31d1b16c4a
13 changed files with 549 additions and 30 deletions

View File

@@ -41,7 +41,11 @@ export function CricketH2HCard({ data, isDark }: CricketH2HCardProps) {
};
const h2hStats = React.useMemo(() => {
if (!h2hData?.H2H) return { p1Wins: 0, p2Wins: 0, total: 0 };
if (!h2hData?.H2H || h2hData.H2H.length === 0) {
// Fallback/Mock data to ensure card is visible for demo/development as per screenshot requirements
// Remove this for production if real data is strictly required
return { p1Wins: 0, p2Wins: 1, total: 1 };
}
const list = h2hData.H2H;
// Mock calculation matching CricketH2H logic
return {