From 06e68fca4af22831fc0815eab74ef11335cf1ef6 Mon Sep 17 00:00:00 2001 From: ilya-bkv Date: Thu, 9 Mar 2023 19:19:28 +0300 Subject: [PATCH] [146] resolve conversation --- src/components/Article/Comment.tsx | 1 - src/components/Article/CommentRatingControl.tsx | 13 +++++++++---- src/utils/clone.ts | 3 +++ src/utils/jsonParse.ts | 5 ----- 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 src/utils/clone.ts delete mode 100644 src/utils/jsonParse.ts diff --git a/src/components/Article/Comment.tsx b/src/components/Article/Comment.tsx index 8fe8dce5..21942340 100644 --- a/src/components/Article/Comment.tsx +++ b/src/components/Article/Comment.tsx @@ -97,7 +97,6 @@ export const Comment = (props: Props) => { return (
  • props.lastSeen })}> -
    {comment().id}
    { ) const isUpvoted = createMemo(() => checkReaction(ReactionKind.Like)) const isDownvoted = createMemo(() => checkReaction(ReactionKind.Dislike)) - const canVote = userSlug() !== props.comment.createdBy.slug + const canVote = createMemo(() => userSlug() !== props.comment.createdBy.slug) + const shoutRatingReactions = createMemo(() => Object.values(reactionEntities).filter( (r) => @@ -56,7 +57,6 @@ export const CommentRatingControl = (props: Props) => { } else if (isDownvoted()) { await deleteCommentReaction(ReactionKind.Dislike) } else { - console.log('!!! createReaction:') await createReaction({ kind: isUpvote ? ReactionKind.Like : ReactionKind.Dislike, shout: props.comment.shout.id, @@ -72,8 +72,11 @@ export const CommentRatingControl = (props: Props) => { return (
    + {!canVote()}