添加网球详情

This commit is contained in:
yuchenglong
2026-01-22 18:48:39 +08:00
parent a279083252
commit c63753e631
16 changed files with 1142 additions and 32 deletions

View File

@@ -5,6 +5,9 @@ import { LiveScoreHeader } from "@/components/live-detail/live-score-header";
import { OddsCard } from "@/components/live-detail/odds-card";
import { OtherInfoCard } from "@/components/live-detail/other-info-card";
import { StatsCard } from "@/components/live-detail/stats-card";
import { TennisPowerGraph } from "@/components/live-detail/tennis-power-graph";
import { TennisScoreboard } from "@/components/live-detail/tennis-scoreboard";
import { TennisStatsCard } from "@/components/live-detail/tennis-stats-card";
import { ThemedText } from "@/components/themed-text";
import { ThemedView } from "@/components/themed-view";
import { Colors } from "@/constants/theme";
@@ -99,14 +102,37 @@ export default function LiveDetailScreen() {
const renderTabContent = () => {
const numericSportId = parseInt(sport_id || "1");
// Tennis Check
const isTennis =
!!match.event_first_player ||
(match.league_name &&
/ATP|WTA|ITF|Challenger/i.test(match.league_name || ""));
switch (activeTab) {
case "stats":
return <StatsCard match={match} isDark={isDark} />;
return !isTennis ? (
<StatsCard match={match} isDark={isDark} />
) : (
<View style={styles.center}>
<ThemedText style={{ opacity: 0.5 }}>
{t("detail.empty_stats")}
</ThemedText>
</View>
);
case "odds":
return (
<OddsCard match={match} isDark={isDark} sportId={numericSportId} />
);
case "detail":
if (isTennis) {
return (
<>
<TennisScoreboard match={match} isDark={isDark} />
<TennisStatsCard match={match} isDark={isDark} />
<TennisPowerGraph match={match} isDark={isDark} />
</>
);
}
return (
<>
<OddsCard match={match} isDark={isDark} sportId={numericSportId} />