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

Post 답글 기능 구현 #76

Merged
merged 13 commits into from
Sep 28, 2023
Merged

Post 답글 기능 구현 #76

merged 13 commits into from
Sep 28, 2023

Conversation

Ubinquitous
Copy link
Member

작업사항

댓글에 답글을 달 수 있는 기능을 구현했습니다.

스크린샷

스크린샷 2023-09-27 오전 11 55 49

@Ubinquitous Ubinquitous added the enhancement New feature or request label Sep 28, 2023
@Ubinquitous Ubinquitous self-assigned this Sep 28, 2023
Copy link
Member

@jyh071116 jyh071116 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

Comment on lines 27 to 45
const [isEditMode, setIsEditMode] = React.useState(false);
const [isDetailMode, setIsDetailMode] = React.useState(false);
const [isRecommentMode, setIsRecommentMode] = React.useState(false);
const [isViewRecommentMode, setIsViewRecommentMode] = React.useState(false);

const { user } = useUser();
const [editDetail, setEditDetail] = React.useState(comment.detail);
const [isLiked, setIsLiked] = React.useState(comment.doesLike);
const [currentLikeCount, setCurrentLikeCount] = React.useState(
comment.likeCount,
);
const { formatDate } = useDate();
const { mutate: updateCommentMutate } = useUpdatePostCommentMutation();
const { mutate: deleteCommentMutate } = useDeletePostCommentMutation();
const { mutate: updateCommentLikeMutate } = useUpdateCommentLikeMutation();

const handleChangeEditModeClick = () => {
setIsEditMode(!isEditMode);
};
Copy link
Member

@jyh071116 jyh071116 Sep 28, 2023

Choose a reason for hiding this comment

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

setIsDetailMode나 setIsReocmmentMode, setIsViewRecommentMode는 따로 함수를 만들지 않았는데 왜 isEditMode는 handleChangeEditModeClick라는 함수를 만드셨을까요? 추상화가 목적이라면 다른 set함수들은 왜 만들지 않으셨나요? 궁금합니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

심신미약 이슈입니다 ㅎㅎ 감사합니다..

@Ubinquitous Ubinquitous merged commit 098a9c4 into main Sep 28, 2023
1 check passed
@Ubinquitous Ubinquitous deleted the feat/post/recomment branch November 27, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants