Skip to content

Commit

Permalink
fix: authorId프롭스 누락 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonjinan096 committed Jul 14, 2024
1 parent 62f18ca commit 1d6d382
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ interface CommentReplyItemProps {
}

const CommentReplyItem = ({ comment }: CommentReplyItemProps) => {
const { replyId, nickname, content, createdAt, userId } = comment;
const { replyId, nickname, content, createdAt, userId: authorId } = comment;
const commentIdFromSearchParams = useSearchParams().get('commentId');

const isSelected = Number(commentIdFromSearchParams) === replyId;

const { userId: ownId } = useGetUserStatusAPI();

const isOwnComment = userId === ownId;
const isOwnComment = authorId === ownId;

return (
<div
Expand All @@ -38,6 +38,7 @@ const CommentReplyItem = ({ comment }: CommentReplyItemProps) => {
content={content}
createdAt={createdAt}
isOwnComment={isOwnComment}
authorId={authorId}
>
<CommentReplyItemMenu replyId={replyId} isOwnComment={isOwnComment} />
</CommentItem>
Expand Down

0 comments on commit 1d6d382

Please sign in to comment.