切换联赛组件

This commit is contained in:
xianyi
2026-01-19 10:30:37 +08:00
parent 00ae46c63e
commit ecd65098b0
2 changed files with 187 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import { HomeHeader } from "@/components/home-header";
import { LeagueModal } from "@/components/league-modal";
import { MatchCard } from "@/components/match-card";
import { MatchCardLeague } from "@/components/match-card-league";
import { SelectionModal } from "@/components/selection-modal";
import { CalendarModal } from "@/components/simple-calendar";
import { ThemedText } from "@/components/themed-text";
@@ -495,9 +496,13 @@ export default function HomeScreen() {
<FlatList
data={matches}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<MatchCard match={item} onFavoriteToggle={handleFavoriteToggle} />
)}
renderItem={({ item }) =>
filterMode === "time" ? (
<MatchCard match={item} onFavoriteToggle={handleFavoriteToggle} />
) : (
<MatchCardLeague match={item} onFavoriteToggle={handleFavoriteToggle} />
)
}
contentContainerStyle={styles.listContent}
ListEmptyComponent={
<View style={styles.center}>