Skip to content

Commit

Permalink
tweak frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Sep 4, 2024
1 parent 7181d59 commit fa2ef19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/pages/profile/LogoutButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -16,7 +16,7 @@ export function LogoutButton() {
navigate("/login");
}
} finally {
setIsLoading(false);
setIsLoading(() => false);
}
}, [navigate]);
return (
Expand Down

0 comments on commit fa2ef19

Please sign in to comment.