From fa2ef19c0667483ca57ad0b96f1c1f7c023428ba Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Tue, 3 Sep 2024 19:01:21 -0700 Subject: [PATCH] tweak frontend --- app/src/pages/profile/LogoutButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/pages/profile/LogoutButton.tsx b/app/src/pages/profile/LogoutButton.tsx index 37a2e9eaca..852d3d0aec 100644 --- a/app/src/pages/profile/LogoutButton.tsx +++ b/app/src/pages/profile/LogoutButton.tsx @@ -7,7 +7,7 @@ export function LogoutButton() { const navigate = useNavigate(); const [isLoading, setIsLoading] = useState(false); const onLogout = useCallback(async () => { - setIsLoading(true); + setIsLoading(() => true); try { const response = await fetch("/auth/logout", { method: "POST", @@ -16,7 +16,7 @@ export function LogoutButton() { navigate("/login"); } } finally { - setIsLoading(false); + setIsLoading(() => false); } }, [navigate]); return (