From cd3c7ace01a2e8e0b0284ca34f51ca4666bb935e Mon Sep 17 00:00:00 2001 From: enes Date: Thu, 14 Nov 2024 13:55:48 +0100 Subject: [PATCH] refactor(comments): add dots to comment reactions --- src/components/comment/index.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/comment/index.tsx b/src/components/comment/index.tsx index efd2dc6..eef9997 100644 --- a/src/components/comment/index.tsx +++ b/src/components/comment/index.tsx @@ -1,4 +1,5 @@ import { NDKEvent } from '@nostr-dev-kit/ndk' +import { Dots } from 'components/Spinner' import { ZapPopUp } from 'components/Zap' import { formatDate } from 'date-fns' import { @@ -447,15 +448,13 @@ const Reactions = (props: Event) => { eTag: props.id }) - if (!isDataLoaded) return null - return ( <>
handleReaction(true)} + onClick={isDataLoaded ? () => handleReaction(true) : undefined} > { > -

{likesCount}

+

+ {isDataLoaded ? likesCount : } +

@@ -476,7 +477,7 @@ const Reactions = (props: Event) => { className={`IBMSMSMBSSCL_CAElement IBMSMSMBSSCL_CAEDown ${ hasReactedNegatively ? 'IBMSMSMBSSCL_CAEDownActive' : '' }`} - onClick={() => handleReaction()} + onClick={isDataLoaded ? () => handleReaction() : undefined} > { > -

{disLikesCount}

+

+ {isDataLoaded ? disLikesCount : } +