Merged
Conversation
프로필 사진 제외
Closed
1 task
pedro0527
approved these changes
Nov 13, 2025
|
|
||
| var nicknameTextFieldState: NicknameTextFieldState = .editing | ||
| var isUserInformationChanged: Bool = false | ||
| var shouldGoBack: Bool = false |
Collaborator
Author
There was a problem hiding this comment.
원래는 View에서 appCoordinator.goBack()을 호출하면 되지만,
여기서는 완료 버튼을 누름 -> 프로필 수정 API 호출 -> 성공 응답 받고 뒤로 가야하기 때문에 State에 상태를 추가했어요
성공 응답 Action이 Reducer에게 전달되었을 때 Reducer에서 이 shouldGoBack을 true로 토글시켜 View에서 onChange로 감시하다 true로 바뀌면 goBack()하게 구현했어요
Comment on lines
+25
to
+27
| effect: MyPageEditEffect = MyPageEditEffect( | ||
| userService: UserService() | ||
| ), |
Contributor
There was a problem hiding this comment.
이건 처음보는 형태인데...? init을 사용한 이유가 있나용
Collaborator
Author
There was a problem hiding this comment.
[feat/#318] 장소상세 동네 변경 Toast
관련 트러블 슈팅
위 PR과 트슈 보면 이해하기 쉽습니다!
약간 API를 호출하거나, 화면의 초기상태를 나타내는 데이터는 State에서 저장하기 보다 Store에서 init으로 주입받고 let으로 관리하여 수정이 불가하게 하는 것이 더 적합하다는 판단하여 위처럼 구현했어요
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.
📄 작업 내용
💻 주요 코드 설명
NicknameTextField 초기값 추가
프로필 수정뷰에 들어갔을 때
NicknameTextField에 초기값으로 유저의nickname이 보여야 해서NicknameTextField컴포넌트에 초기값을 설정할 수 있도록 수정했어요기존 사용방식에 영향X
기존에는
@State private var text: String = ""이렇게 State변수의 초기값이""로 고정이었습니다.초기값을 추가하기 위해
init()함수에initialText: String인자값을 추가하여 초기값을 받아@State변수를 초기화 하도록 수정했어요디폴트값
""으로 설정하여 기존에 사용하던 곳에서는 영향이 없게 했습니다.NicknameTextField 키보드 내렸을 때 중복 검사
처음에는
.onTapGesture를 통해 키보드를 내렸을 때 닉네임 중복 검사 API를 호출하려 했지만이렇게 되면 키보드를 올리지 않은 상태에서 화면을 탭했을 때도 닉네임 중복 검사 API가 호출되기 때문에
@FocusState를 사용하여 키보드 포커스가 풀리는 시점에 닉네임 중복 검사 API를 호출하도록 구현했어요참고PR: [fix/#305] 장소 제보하기/등록하기 QA TextEditor 키보드 수정사항 반영
🔗 연결된 이슈