Skip to content

Commit

Permalink
fix:로그인 화면에서 다시 로그인으로 돌아오는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahyeeee committed Sep 21, 2023
1 parent 83b813e commit 6abd85d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/hooks/api/useLogInMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ export const useLogInMutation = () => {
axiosInstance.defaults.headers.Authorization = `Bearer ${accessToken}`;

setIsLoggedIn(true);
navigate(-2);
},
onError: () => {
setIsLoggedIn(false);

createToast('오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
},
onSettled: () => {
navigate(PATH.ROOT);
},
});
Expand Down

0 comments on commit 6abd85d

Please sign in to comment.