-
Notifications
You must be signed in to change notification settings - Fork 2
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
Post 답글 기능 구현 #76
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.
수고하셨습니다
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); | ||
}; |
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.
setIsDetailMode나 setIsReocmmentMode, setIsViewRecommentMode는 따로 함수를 만들지 않았는데 왜 isEditMode는 handleChangeEditModeClick라는 함수를 만드셨을까요? 추상화가 목적이라면 다른 set함수들은 왜 만들지 않으셨나요? 궁금합니다!
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.
심신미약 이슈입니다 ㅎㅎ 감사합니다..
작업사항
댓글에 답글을 달 수 있는 기능을 구현했습니다.
스크린샷