From 01c171ff2faa65f33714f945e9d80628b1a26ebe Mon Sep 17 00:00:00 2001 From: xianyi Date: Mon, 19 Jan 2026 10:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=81=94=E8=B5=9B=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/index.tsx | 61 +++++++++----------------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index f4080fd..3274886 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -1,5 +1,4 @@ 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"; @@ -71,7 +70,6 @@ export default function HomeScreen() { // Modal Visibilities const [showSportModal, setShowSportModal] = useState(false); const [showCalendarModal, setShowCalendarModal] = useState(false); - const [showLeagueModal, setShowLeagueModal] = useState(false); // Load Sports and Leagues useEffect(() => { @@ -441,43 +439,18 @@ export default function HomeScreen() { - {/* Date/League Selector */} - {filterMode === "time" ? ( - setShowCalendarModal(true)} - > - - {selectedDate.getDate()} - - - {timezoneLabel} {nowTimeText} - - - ) : ( - { - // 立即显示弹窗 - setShowLeagueModal(true); - // 如果联赛列表为空,立即设置loading状态并加载 - if (selectedSportId !== null) { - if (leagues.length === 0) { - setLoadingLeagues(true); - } - loadLeagues(); - } - }} - > - - - {selectedLeagueKey - ? leagues.find((l) => l.key === selectedLeagueKey)?.name || - t("home.select_league") - : t("home.select_league")} - - - )} + {/* Date Selector */} + setShowCalendarModal(true)} + > + + {selectedDate.getDate()} + + + {timezoneLabel} {nowTimeText} + + ); @@ -533,16 +506,6 @@ export default function HomeScreen() { /> )} - {showLeagueModal && ( - setShowLeagueModal(false)} - leagues={leagues} - selectedLeagueKey={selectedLeagueKey} - loading={loadingLeagues} - onSelect={handleLeagueSelect} - /> - )} ); }