-
Notifications
You must be signed in to change notification settings - Fork 2
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] 초대 페이지 및 대시보드 페이지 QA #499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~~ 드디어 QA가 끝나가네요!! 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 ~! 몇 개의 코멘트만 확인해주세용
} | ||
}, [createToast, data, failureCount, invitationId, invitationInfo?.teamId, isLogined, navigate]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘는 왜 ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEffect안에서 handleApiError 함수를 호출했는데 이 함수도 의존성배열로 취급해버려 함수는 랜더링될때마다 새로 생성되고 useEffect도 매번 생성되는 경고가 떠서 저걸로 막았습니다.
근데 이제 생각해보니 저 함수는 useEffect안에서만 사용이 되므로 안에서 생성하면 의존성배열에 추가하지 않아도 되더라구요!? 그래서 안으로 모셨습니다.~
onSuccess: (res) => { | ||
if (res.success) { | ||
createToast(res.message, 'success'); | ||
|
||
localStorage.setItem(STORAGE_KEY.TEAM_ID, `${teamId}`); | ||
localStorage.setItem(STORAGE_KEY.TEAM_NAME, `${invitationInfo?.teamName}`); | ||
} else { | ||
createToast(res.message, 'error'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
왜 이렇게 하신거죠 ? onSuccess
가 이미 쿼리로 데이터를 가져오는데 성공했을 때 콜백이 실행하므로 재검증하는 로직은 불필요할 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
초대 수락에 실패해도 onSuccess로 들어와서 res.success 확인을 하지 않으면 '이미 존재하는 회원입니다'와 같은 에러 메시지도 success toast로 뜹니다.
제 생각엔 api 결과가 모두 { success: boolean, message: string } 객체로 반환되어 실패하든 성공하든 onSuccess함수로 들어오게 되는 것 같습니다. 그래서 onSuccess 안에서 다시 구분해줬습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오잉 띠용이네요 이거.. 왜 그러지
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
큐에이 고생했어융 ~~
onSuccess: (res) => { | ||
if (res.success) { | ||
createToast(res.message, 'success'); | ||
|
||
localStorage.setItem(STORAGE_KEY.TEAM_ID, `${teamId}`); | ||
localStorage.setItem(STORAGE_KEY.TEAM_NAME, `${invitationInfo?.teamName}`); | ||
} else { | ||
createToast(res.message, 'error'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오잉 띠용이네요 이거.. 왜 그러지
onSuccess: (res) => { | ||
if (res.success) { | ||
createToast(res.message, 'success'); | ||
} else { | ||
createToast(res.message, 'error'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요것도 같은 문제인가보네요 ,,
해당 이슈 번호
closed #498
체크리스트
💎 PR Point
📌스크린샷 (선택)