From dace9cd90b498c71c6476582d1b62cd5301ce99a Mon Sep 17 00:00:00 2001 From: choi Date: Wed, 20 Nov 2024 16:21:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=98=A4=EB=A5=98=20=EC=B5=9C=EC=A2=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/provider/userProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/provider/userProvider.tsx b/src/provider/userProvider.tsx index 3fc633a..89f1e80 100644 --- a/src/provider/userProvider.tsx +++ b/src/provider/userProvider.tsx @@ -34,12 +34,12 @@ export function UserProvider({ children }: { children: React.ReactNode }) { const fetchUser = async () => { try { + setIsLoading(true); const { data } = await api.get("/artist"); setUser(data); } catch (err) { if (err instanceof AxiosError) { if (err.response?.status === 401) { - // 인증 에러일 경우 로그아웃 상태로 처리 setIsLoggedIn(false); setUser(null); }