-
Notifications
You must be signed in to change notification settings - Fork 8
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
[FE] 리뷰 재촉 기능(#747) #757
[FE] 리뷰 재촉 기능(#747) #757
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.
코드 모두 확인했어요
혹시나 의도된대로 코드가 작성된건지에 대해 코멘트를 남겨봤어요!
frontend/src/@types/alaram.ts
Outdated
@@ -27,3 +29,8 @@ export interface AlarmAsRead { | |||
alarmId: number; | |||
alarmType: "USER"; | |||
} | |||
|
|||
export interface RevieweReminderAlarm { |
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.
여기 ReviewReminderAlarm 인데 오타인거 같네요!
postReviewUrge({ roomId, reviewerId }), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
queryKey: [QUERY_KEYS.REVIEWERS, roomId, QUERY_KEYS.ALARM_COUNT, QUERY_KEYS.ALARM_LIST], |
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.
QUERY_KEYS.REVIEWERS, roomId, QUERY_KEYS.ALARM_COUNT, QUERY_KEYS.ALARM_LIST
각각의 key에 대한 invalidateQuery를 하려고 한것 같은데 이것은 결국 하나의 key 이기에 예상한대로 동작하지 않을거에요
queryClient.invalidateQueries({
queryKey: [QUERY_KEYS.REVIEWERS, roomId]
});
queryClient.invalidateQueries({
queryKey: [QUERY_KEYS.ALARM_COUNT]
});
queryClient.invalidateQueries({
queryKey: [QUERY_KEYS.ALARM_LIST]
});
이런식으로 각각에 대해 invalid 를 만들어줘야해요
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.
재촉하기가 프로젝트 초반에 기획 얘기할 때 나왔었는데 운영해보니까 꼭 필요한 기능 같네요..!! 알림 파트 계속 맡으신 것 같은데 수고하셨습니당🤗🤗
frontend/src/constants/message.ts
Outdated
@@ -42,6 +42,7 @@ const ERROR_MESSAGES = { | |||
POST_REVIEW_COMPLETE: "코드리뷰 완료 요청에 실패했습니다.", | |||
GET_MY_REVIEWERS: "리뷰어 목록을 불러오는 도중 에러가 발생하였습니다.", | |||
GET_MY_REVIEWEES: "리뷰이 목록을 불러오는 도중 에러가 발생하였습니다.", | |||
POST_REVIEW_URGE: "코드리뷰 재촉하기에 실패했습니다.", |
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.
POST_REVIEW_URGE: "코드리뷰 재촉하기에 실패했습니다.", | |
POST_REVIEW_URGE: "코드리뷰 재촉 요청에 실패했습니다.", |
코드리뷰 완료랑 비슷하게 이런 문구 어떤가요~~?
queryClient.invalidateQueries({ | ||
queryKey: [QUERY_KEYS.REVIEWERS, roomId, QUERY_KEYS.ALARM_COUNT, QUERY_KEYS.ALARM_LIST], | ||
}); |
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.
이렇게 되면 postReviewComplete 성공할 때도 ALARM_COUNT랑 ALARM_LIST를 invalidate 처리 해야할 것 같아요..!
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.
맞네용 이전 PR에서 놓쳤던 부분인데 짚어주셔서 감사합니다 :>
<span>{username}</span> 님이 <span>{info}</span> 미션에 대해 <span>코드리뷰를 완료</span> | ||
했습니다. |
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.
피드백을 빠르게 반영했군요! 고생하셨어요 👍👍
📓 스토리북 링크
바로가기
📌 관련 이슈
✨ PR 세부 내용