Skip to content

Commit

Permalink
fix: login/main 페이지 로그인 성공 후 메인 페이지로 이동하지 않는 현상 수정 #5
Browse files Browse the repository at this point in the history
fix: login/main 페이지 로그인 성공 후 메인 페이지로 이동하지 않는 현상 수정
  • Loading branch information
Joonhyung-Choi committed Nov 12, 2023
1 parent 0359e5d commit a3e0af9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/container/loginPage/loginMain/LoginMainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function LoginMainContainer() {
setToken(accessToken, refreshToken);
setModalMessage("정상 로그인 되었습니다.");
setIsModalOpen(true);
setIsLoginSuccess(true);
} else {
setIsModalOpen(true);
setModalMessage("로그인에 실패했습니다.");
Expand All @@ -83,8 +84,8 @@ function LoginMainContainer() {
onClickClose={() => setIsModalOpen(false)}
onClickConfirm={() => {
if (isLoginSuccess) {
setIsModalOpen(false);
router.push("/");
setIsModalOpen(false);
} else {
setIsModalOpen(false);
}
Expand Down

0 comments on commit a3e0af9

Please sign in to comment.