Skip to content
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

Merged
merged 4 commits into from
Apr 28, 2024
Merged

Feat/account #21

merged 4 commits into from
Apr 28, 2024

Conversation

jwchoi-kr
Copy link
Collaborator

변경점

  1. 유저 account page 구현
  2. dashboard에서 pending 상태인 session 삭제 할 수 있도록 만듦
  3. nickname으로 되어있던거 name으로 전부 수정

2에서 activate하면 delete session은 못하고 deactivate만 할 수 있는데 이때 delete session 버튼을 disable 해놓기 vs 그냥 숨겨버리기 뭐로 하는게 좋으려나

onClick={() => onSubmit?.(sessionName)}
onClick={() => {
onSubmit?.(sessionName);
setSessionState("pending");
Copy link
Collaborator

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();
Copy link
Collaborator

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] 로 넣어주면 될 듯?

Copy link
Collaborator Author

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 쓰면 되려나?

Copy link
Collaborator

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 쪽에서도 자동으로 업데이트되지 않나

@Scripter36
Copy link
Collaborator

2번은 dev 가서 해 보니 차라리 버튼이 없으면 선택지가 하나밖에 없어지니 더 괜찮을 것 같기도?

@Scripter36 Scripter36 merged commit dcbba25 into develop Apr 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants