[ID - 40] 장부 온보딩 반복 노출 이슈 #60
Merged
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.
요약
장부 온보딩이 노출됐음에도 불구하고 이후 재노출되는 현상을 수정했습니다.
원인
온보딩 노출 여부를 판단하기 위해서는 onboardingType 값(운영진 or 멤버)이 필요합니다.
이 onboardingType은 memberList 값을 기반으로 설정되는데, 해당 값은 fetchAgencyMemberList 함수에서 세팅됩니다.
하지만 fetchAgencyMemberList와 온보딩 노출 여부를 결정하는 함수가 비동기로 동시에 실행되고 있어, memberList가 아직 세팅되지 않은 상태에서 잘못된 onboardingType을 참조하는 문제가 발생했었습니다.
-> 순차적으로 호출되도록 변경했습니다.
작업내용
스크린샷
기타
state값을 변경하는게 불필요하다 판단하여 해당 코드를 삭제했습니다.(2555b72)