From c2950c559adb9809c661c333bb816078f401eb4b Mon Sep 17 00:00:00 2001 From: ddshi <8811906+ddshi@user.noreply.gitee.com> Date: Thu, 29 Jan 2026 16:58:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DuseEffect=E6=97=A0?= =?UTF-8?q?=E9=99=90=E6=89=A7=E8=A1=8C=E9=97=AE=E9=A2=98=20(P0=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E4=BF=AE=E5=A4=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/HomePage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 5a1b3eb..f2de19b 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -47,10 +47,11 @@ export function HomePage() { const [formRepeatType, setFormRepeatType] = useState('none'); const [formIsHoliday, setFormIsHoliday] = useState(false); + // Initialize auth and data on mount useEffect(() => { checkAuth(); - fetchEvents(); - }, [checkAuth, fetchEvents]); + fetchEvents().catch(console.error); + }, []); // eslint-disable-line react-hooks/exhaustive-deps const handleLogout = async () => { await logout();