优化篮球分数显示
This commit is contained in:
@@ -90,19 +90,23 @@ export default function LiveDetailScreen() {
|
||||
eventType: "",
|
||||
eventToss: "",
|
||||
eventManOfMatch: "",
|
||||
scores: match.scores,
|
||||
stats: match.statistics,
|
||||
scores: Array.isArray(match.scores) && match.scores.length > 0 && 'type' in match.scores[0]
|
||||
? match.scores as { type: string; home: string; away: string; }[]
|
||||
: undefined,
|
||||
stats: Array.isArray(match.statistics) && match.statistics.length > 0 && 'type' in match.statistics[0]
|
||||
? match.statistics as { type: string; home: string; away: string; }[]
|
||||
: 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,
|
||||
})),
|
||||
}
|
||||
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,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user