From 84d01b217084b41dbfd53e500133bd7b56067d43 Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Thu, 18 Mar 2021 00:03:28 +0500 Subject: [PATCH] removed upvote status calculator for testing --- .../upvote/container/upvoteContainer.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/upvote/container/upvoteContainer.js b/src/components/upvote/container/upvoteContainer.js index 14e818100..bb3973e08 100644 --- a/src/components/upvote/container/upvoteContainer.js +++ b/src/components/upvote/container/upvoteContainer.js @@ -46,21 +46,21 @@ const UpvoteContainer = (props) => { useEffect(() => { let _isMounted = true; - const _calculateVoteStatus = async () => { - const _isVoted = await isVotedFunc(activeVotes, get(currentAccount, 'name')); - const _isDownVoted = await isDownVotedFunc(activeVotes, get(currentAccount, 'name')); + // const _calculateVoteStatus = async () => { + // const _isVoted = await isVotedFunc(activeVotes, get(currentAccount, 'name')); + // const _isDownVoted = await isDownVotedFunc(activeVotes, get(currentAccount, 'name')); - if (_isMounted) { - setIsVoted(_isVoted && parseInt(_isVoted, 10) / 10000); - setIsDownVoted(_isDownVoted && (parseInt(_isDownVoted, 10) / 10000) * -1); + // if (_isMounted) { + // setIsVoted(_isVoted && parseInt(_isVoted, 10) / 10000); + // setIsDownVoted(_isDownVoted && (parseInt(_isDownVoted, 10) / 10000) * -1); - if (localVoteMap) { - _handleLocalVote(); - } - } - }; + // if (localVoteMap) { + // _handleLocalVote(); + // } + // } + // }; - _calculateVoteStatus(); + // _calculateVoteStatus(); return () => (_isMounted = false); }, [activeVotes]);