-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/account #21
Feat/account #21
Conversation
onClick={() => onSubmit?.(sessionName)} | ||
onClick={() => { | ||
onSubmit?.(sessionName); | ||
setSessionState("pending"); |
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.
onSubmit이 실패할 수도 있어서 바로 pending으로 하면 의도하지 않은 state가 될 수도 있을 듯
queryClient.invalidateQueries({ | ||
queryKey: ["classId"], | ||
}); | ||
refetch(); |
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.
refetch보다는 위의 invalidateQueries에서 queryKey를 ["currentSessionInfo", courseId] 로 넣어주면 될 듯?
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.
이거 InfoCard.tsx에서도 rerender 해줘야하는데 InfoCard.tsx랑 CodePopup.tsx에서 쓴거처럼 BroadcastChannel 쓰면 되려나?
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.
["currentSessionInfo", courseId] 로 invalidate 하면 useCurrentSessionInfo 값이 바뀌니 InfoCards 쪽에서도 자동으로 업데이트되지 않나
2번은 dev 가서 해 보니 차라리 버튼이 없으면 선택지가 하나밖에 없어지니 더 괜찮을 것 같기도? |
변경점
2에서 activate하면 delete session은 못하고 deactivate만 할 수 있는데 이때 delete session 버튼을 disable 해놓기 vs 그냥 숨겨버리기 뭐로 하는게 좋으려나