diff --git a/src/components/comment/Comment.tsx b/src/components/comment/Comment.tsx
index f850b40..c5bc1f2 100644
--- a/src/components/comment/Comment.tsx
+++ b/src/components/comment/Comment.tsx
@@ -43,6 +43,7 @@ const Comment = () => {
const handleHideComment = (commentId: number) => {
setIsHide(!isHide);
setShowComment(commentId);
+ // console.log(`comment ${commentId}`);
};
const getComments = async () => {
@@ -92,6 +93,7 @@ const Comment = () => {
isHide={isHide}
setIsHide={() => handleHideComment(comment.commentId)}
type={"origin"}
+ showComment={showComment}
/>
{isHide &&
comment.children !== null &&
@@ -102,7 +104,11 @@ const Comment = () => {
className="flex flex-row justify-between px-2 ml-10 "
>
-
+
))
: null}
diff --git a/src/components/comment/CommentItem.tsx b/src/components/comment/CommentItem.tsx
index 1a05683..ba032cd 100644
--- a/src/components/comment/CommentItem.tsx
+++ b/src/components/comment/CommentItem.tsx
@@ -11,21 +11,32 @@ interface CommentItems {
datas: CommentTypes;
isHide?: boolean;
setIsHide?: () => void;
+ showComment: number | null;
type: "origin" | "child";
}
-const CommentItem = ({ datas, isHide, setIsHide, type }: CommentItems) => {
+const CommentItem = ({
+ datas,
+ isHide,
+ setIsHide,
+ type,
+ showComment,
+}: CommentItems) => {
const [isEdit, setIsEdit] = useState(false);
const [is2CHide, setIs2CHide] = useState(false);
const [editCommitId, setEditCommentId] = useState