Skip to content

Commit

Permalink
[!HOTFIX] 회원가입 성공 후 로직
Browse files Browse the repository at this point in the history
  • Loading branch information
imddoy committed Jan 24, 2025
1 parent 1569d01 commit 10f560f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/pages/signUp/apis/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ const signup = async (requestBody: SignupRequest): Promise<void> => {
// 성공 응답 처리
const data = response.data;

// 토큰 가져오기
localStorage.getItem(data.jwtTokenResponse.accessToken);
localStorage.getItem(data.jwtTokenResponse.refreshToken);
localStorage.getItem(data.email);
localStorage.getItem(data.nickname);
const user = {
accessToken: data.jwtTokenResponse.accessToken,
refreshToken: data.jwtTokenResponse.refreshToken,
nickname: data.nickname,
email: data.email,
};
localStorage.setItem('user', JSON.stringify(user));

alert('회원가입 성공! 메인 페이지로 이동합니다.');
window.location.href = '/';
Expand Down

0 comments on commit 10f560f

Please sign in to comment.