From 13343ce8fe36a9cf56368a198fa3e18f86668124 Mon Sep 17 00:00:00 2001 From: choi Date: Wed, 27 Nov 2024 14:32:44 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/provider/userProvider.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/provider/userProvider.tsx b/src/provider/userProvider.tsx index a85600c..23d79c9 100644 --- a/src/provider/userProvider.tsx +++ b/src/provider/userProvider.tsx @@ -52,7 +52,7 @@ export function UserProvider({ children }: { children: React.ReactNode }) { } finally { setIsLoading(false); } - }, [setIsLoggedIn]); + }, []); useEffect(() => { if (!isLoggedIn) { @@ -60,7 +60,8 @@ export function UserProvider({ children }: { children: React.ReactNode }) { setIsLoading(false); return; } - }, [isLoggedIn]); + fetchUser(); + }, [isLoggedIn, fetchUser]); const logout = useCallback(async () => { try {