Qnrr 375 유수아 내 프로필 수정에서 입력한 값 유효성 검증#91
Merged
Conversation
- 프로필 수정 요청을 2번 보내고 있어, onSubmit 삭제
- ProfileEditModal에서 폼상태를 관리하면 memberProfile이 변경돼도, 폼 상태가 변경되지 않음
This was referenced Jul 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌱 연관된 이슈
Qnrr 375
☘️ 작업 내용
1. input의 에러 안내 문구 추가
입력한 이름과 연락처가 형식에 맞지 않는데 서버에 요청을 보낼 경우, 에러 응답이 옵니다.
유효하지 않은 입력값을 입력하면 요청보내지 못하도록 막기 위해, 에러 문구를 추가하고 submit 버튼에 disabled 설정했습니다.
default.mov
2. ProfileEditForm
ProfileEditModal에 있는 폼을 ProfileEditForm 컴포넌트로 분리했습니다.
이전에는 모달에 작성한 입력값이 유지되는 문제가 있었습니다.
Modal.Root가 최상위 JSX인 ProfileEditModal에 폼 상태를 선언하면, 모달의 렌더링 여부와 상관없이 폼 상태가 프로필 정보로 초기화되지 않습니다.
2025-07-19.12.54.40.mov
따라서 폼 상태를 프로필 정보로 초기화하기 위해, 폼 컴포넌트로 분리하였습니다.