Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] userId를 localStorage에서 store객체로 분리 #385

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

surpise
Copy link
Collaborator

@surpise surpise commented Feb 2, 2024

이슈 번호

#363

완료한 기능 명세

  • localStorage에 저장하던 userId를 store 객체에 저장

userId를 저장하는 useUserStore 생성
userId를 useUserStore에서 받아오도록 변경
Zustand의 persist를 이용하여 페이지 새로기침 시 초기화되지 않도록 수정
@surpise surpise added enhancement 개선 또는 피드백 반영 FE 🎨 FrontEnd labels Feb 2, 2024
@surpise surpise added this to the 개선 milestone Feb 2, 2024
@surpise surpise requested review from dohun2 and gimewn February 2, 2024 06:24
@surpise surpise self-assigned this Feb 2, 2024
Copy link
Collaborator

@gimewn gimewn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요!!

@@ -10,7 +10,7 @@ const interceptor = async (url: string, option: any) => {
const refreshResponse = await refresh();

if (refreshResponse?.status === 401 || refreshResponse?.status === 500) {
localStorage.clear();
console.log('asdf')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log는 지워주세요🤗

console.log 삭제
@surpise surpise merged commit 2b97e38 into boostcampwm2023:develop Feb 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 개선 또는 피드백 반영 FE 🎨 FrontEnd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants