优化详情显示
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { BasketballScoreTable } from "@/components/match-detail/basketball/basketball-score-table";
|
||||
import { FootballEvents } from "@/components/match-detail/football/football-events";
|
||||
import { FootballScoreTable } from "@/components/match-detail/football/football-score-table";
|
||||
import { LeagueInfo } from "@/components/match-detail/league-info";
|
||||
import { MatchInfoCard } from "@/components/match-detail/match-info-card";
|
||||
@@ -71,6 +72,8 @@ export default function MatchDetailScreen() {
|
||||
setError(null);
|
||||
const result = await fetchMatchDetail(id as string);
|
||||
setData(result);
|
||||
console.log("首发阵容" , result.match.players?.away_team);
|
||||
|
||||
} catch (err: any) {
|
||||
setError(err.message || t("detail.fetch_failed"));
|
||||
} finally {
|
||||
@@ -104,11 +107,12 @@ export default function MatchDetailScreen() {
|
||||
case "info":
|
||||
// 根据 sportId 显示不同的详情组件
|
||||
if (sportId === 1) {
|
||||
// 足球:显示 FootballScoreTable (半场/全场) 和 MatchInfoCard
|
||||
// 足球:显示 FootballScoreTable (半场/全场)、MatchInfoCard 和 FootballEvents
|
||||
return (
|
||||
<>
|
||||
<FootballScoreTable data={data} isDark={isDark} />
|
||||
<MatchInfoCard data={data} isDark={isDark} />
|
||||
<FootballEvents data={data} isDark={isDark} />
|
||||
</>
|
||||
);
|
||||
} else if (sportId === 2) {
|
||||
@@ -125,6 +129,7 @@ export default function MatchDetailScreen() {
|
||||
<>
|
||||
<FootballScoreTable data={data} isDark={isDark} />
|
||||
<MatchInfoCard data={data} isDark={isDark} />
|
||||
<FootballEvents data={data} isDark={isDark} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user