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