Skip to content

Commit

Permalink
fix: 로그인 후 리다이렉트 페이지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Youn-Rha committed Nov 14, 2024
1 parent 2987c04 commit e7e1325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/RedirectPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const RedirectPage = () => {
const response = await kakaoLoginCallback(code);
setTokens(response.accessToken, response.refreshToken);
// 리다이렉트할 경로를 로컬스토리지에서 가져오고, 기본값을 "/"로 설정
const redirectPath = localStorage.getItem("redirectPath") || "/";
const redirectPath = localStorage.getItem("redirectPath") || "/main";
localStorage.removeItem("redirectPath"); // 사용 후 경로 삭제
navigate(redirectPath);
} catch (error) {
Expand Down

0 comments on commit e7e1325

Please sign in to comment.