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

[ Fix ] 닉네임 중복체크 여부 유지 #280

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

lydiacho
Copy link
Collaborator

@lydiacho lydiacho commented Oct 14, 2024

#️⃣ Related Issue

Closes #271

✅ Done Task

  • 닉네임 중복체크 여부 다음단계 넘어갔다가 돌아와도 유지

💎 PR Point

기존에는 다음단계로 넘어갔다가 다시 돌아오면 입력했던 닉네임 문자는 유지되지만, 중복체크했던 여부는 유지되지 않아서 매번 다시 중복체크를 했어야 했어요.
중복체크 여부가 유지될 수 있도록 context data에 isNicknameValid 필드를 추가해줬습니다!

Step개인정보입력 컴포넌트 내에서 nicknameStatus state는 INVALID, CONFLICT, VALID, EMPTY 이런 값을 쓰고 있는데, 왜 context에서는 boolean 값으로 관리해주냐! 하실 수 있는데,

해당 단계 내에서 어차피 중복체크statusVALID된 경우에만 다음단계로 넘아갈 수 있기 때문에,
다음단계 버튼을 클릭할 경우에 저장되는 context data에서 닉네임은 항상 유효하다고 보장할 수 있어요. 그래서 true 값으로 바로 넘겨줍니다.
그리고 다시 단계 돌아왔을 때, 만약 isNicknameValidtrue 값이 저장되어있다면 최초로 단계에 진입한게 아니라 이미 중복체크하고 다음단계 넘어왔다가 돌아왔다는 뜻이니까 status 초기값VALID로, 그게 아니라면 EMPTY 상태로 초기화해주도록 구현했어요 !

📸 Screenshot

2024-10-14.7.02.35.mov

@lydiacho lydiacho added 🛠 Fix 기존의 버그 수정 labels Oct 14, 2024
@lydiacho lydiacho self-assigned this Oct 14, 2024
Copy link
Collaborator

@se0jinYoon se0jinYoon left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@ijieun ijieun left a comment

Choose a reason for hiding this comment

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

lgtm!

@lydiacho lydiacho merged commit 3eef5a4 into develop Oct 14, 2024
1 check passed
@lydiacho lydiacho deleted the fix/#271/keepIsCheck branch October 14, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Fix 기존의 버그 수정 size/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ Fix ] 닉네임 중복체크 여부 유지
3 participants