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

대시보드 내가 제출한 디스커션 구현 (issue #440) #477

Closed
wants to merge 10 commits into from

Conversation

brgndyy
Copy link
Contributor

@brgndyy brgndyy commented Sep 19, 2024

구현 요약

대시보드창에서 내가 작성한 디스커션과 디스커션 관련 댓글 기능을 구현합니다.

연관 이슈

참고

코드 리뷰에 RCA 룰을 적용할 시 참고해주세요.

헤더 설명
R (Request Changes) 적극적으로 반영을 고려해주세요
C (Comment) 웬만하면 반영해주세요
A (Approve) 반영해도 좋고, 넘어가도 좋습니다. 사소한 의견입니다.

Copy link
Contributor

@chosim-dvlpr chosim-dvlpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 버건디~ 대시보드 구현하느라 고생하셨습니다!!🤗 궁금한 점은 코멘트 달아놓았으니 확인 부탁드려요!

const commentDate = formatDateString(createdAt);

return (
<S.CommentWrapper to={`/solutions/${solutionId}`}>
<S.CommentWrapper to={`/discussions/${contentId}`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MyComment가 공통으로 사용되는 컴포넌트라 Comment 클릭 시 이동하는 경로를 다르게 지정해야 할 것 같은데 어떻게 생각하실까요?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

짚어주셔서 감사해용~ 타입을 props로 받아서 바꿔보았습니다!

@@ -29,3 +29,8 @@ export const hashTagsKeys = {
export const userKeys = {
info: ['userInfo'],
};

export const DashboardKeys = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase로 작성해주시면 좋을 것 같습니다~

const useDashboardDiscussionComment = () => {
return useSuspenseQuery({
queryFn: getDashboardDiscussionComments,
queryKey: DashboardKeys.comments,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments가 discussion, solution 두 종류로 나누어져서 query key도 두 종류가 있으면 좋을 것 같다는 생각이 드는데요..! ['comments', 'discussion'] 이렇게 하는 건 어떨까요??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

쿼리키 분리해보았는데 이렇게 말씀하신게 맞는지 확신이 서진 않네요..!

Comment on lines +10 to +36
const NO_CONTENT_INFO = {
inProgress: {
route: ROUTES.missionList,
mainText: '진행 중인 미션이 없어요',
subText: '새로운 미션을 찾으러 가볼까요?',
buttonText: '미션 둘러보기',
},
submitted: {
route: ROUTES.solutions,
mainText: '제출한 솔루션이 없어요',
subText: '참여할 수 있는 미션을 찾아보러 가볼까요?',
buttonText: '미션 둘러보기',
},
comments: {
route: ROUTES.solutions,
mainText: '제출한 댓글이 없어요',
subText: '댓글을 달아볼까요?',
buttonText: '솔루션 둘러보기',
},
dashboardDiscussion: {
route: '/discussion',
mainText: '제출한 디스커션이 없어요',
subText: '다른 사람들이 작성한 디스커션을 보러 가볼까요?',
buttonText: '디스커션 둘러보기',
},
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 이렇게 객체로 하니까 훨씬 깔끔해요!!!👍🏻👍🏻

@chosim-dvlpr
Copy link
Contributor

백엔드 파일이 추가되어서 백엔드 CI가 돌아가지 않는 것 같은데...🧐 혹시 추가되어 있는 java 파일이 필요하지 않다면 지워보는 것은 어떨까요...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚒️ 기능 작업해야하는 기능 🎨 프론트엔드 프론트엔드 관련 이슈
Projects
Status: 😎 DONE
Development

Successfully merging this pull request may close these issues.

대시보드 내가 제출한 디스커션 구현
2 participants