From 8552a9058d7421dd6810918c2f39f29a34f887ec Mon Sep 17 00:00:00 2001 From: apostolof Date: Sun, 7 Feb 2021 16:56:42 +0200 Subject: [PATCH] fix: resolve merge issues --- .../components/PostList/PostListRow/index.jsx | 4 +++- .../src/components/PostList/PostVoting/index.jsx | 16 ++++++++-------- .../components/TopicList/TopicListRow/index.jsx | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/concordia-app/src/components/PostList/PostListRow/index.jsx b/packages/concordia-app/src/components/PostList/PostListRow/index.jsx index f2be072..e2a86b7 100644 --- a/packages/concordia-app/src/components/PostList/PostListRow/index.jsx +++ b/packages/concordia-app/src/components/PostList/PostListRow/index.jsx @@ -1,7 +1,9 @@ import React, { memo, useEffect, useMemo, useState, useCallback, } from 'react'; -import { Dimmer, Feed, Placeholder, Ref } from 'semantic-ui-react'; +import { + Dimmer, Feed, Placeholder, Ref, +} from 'semantic-ui-react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import TimeAgo from 'react-timeago'; diff --git a/packages/concordia-app/src/components/PostList/PostVoting/index.jsx b/packages/concordia-app/src/components/PostList/PostVoting/index.jsx index 022c81f..a0f223c 100644 --- a/packages/concordia-app/src/components/PostList/PostVoting/index.jsx +++ b/packages/concordia-app/src/components/PostList/PostVoting/index.jsx @@ -3,12 +3,11 @@ import React, { } from 'react'; import { Button, Popup } from 'semantic-ui-react'; import PropTypes from 'prop-types'; - -import './styles.css'; import { useSelector } from 'react-redux'; -import { POST_VOTING_CONTRACT } from '../../../constants/contracts/ContractNames'; +import { POST_VOTING_CONTRACT } from 'concordia-shared/src/constants/contracts/ContractNames'; import { drizzle } from '../../../redux/store'; import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus'; +import './styles.css'; const CHOICE_DEFAULT = '0'; const CHOICE_UP = '1'; @@ -66,7 +65,7 @@ const PostVoting = (props) => { const shouldGetOwnVoteFromChain = ownVote === null; if (drizzleInitialized && !drizzleInitializationFailed && shouldGetOwnVoteFromChain - && postId !== null && userAccount !== null) { + && postId !== null && userAccount !== null) { setGetVoteCallHash(getVoteChainData(postId, userAccount)); } }, [drizzleInitializationFailed, drizzleInitialized, ownVote, postId, userAccount]); @@ -92,8 +91,9 @@ const PostVoting = (props) => { // Voting useEffect(() => { if (voting && transactionStack && transactionStack[createVoteCacheSendStackId] - && transactions[transactionStack[createVoteCacheSendStackId]]) { - if (transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_SUCCESS || transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_ERROR) { + && transactions[transactionStack[createVoteCacheSendStackId]]) { + if (transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_SUCCESS + || transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_ERROR) { setVoting(false); } } @@ -125,7 +125,7 @@ const PostVoting = (props) => {    {totalVoteCount || 0} -    +    )} disabled={(upvoteCount === null && downvoteCount === null) || (upvoteCount === '0' && downvoteCount === '0')} @@ -135,7 +135,7 @@ const PostVoting = (props) => { + {upvoteCount} -    +    ) : null} diff --git a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx index 7e4fb40..6146736 100644 --- a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx +++ b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx @@ -10,9 +10,9 @@ import TimeAgo from 'react-timeago'; import { useHistory } from 'react-router'; import { useDispatch, useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; -import ProfileImage from '../../ProfileImage'; import { FORUM_CONTRACT } from 'concordia-shared/src/constants/contracts/ContractNames'; import { TOPICS_DATABASE, USER_DATABASE } from 'concordia-shared/src/constants/orbit/OrbitDatabases'; +import ProfileImage from '../../ProfileImage'; import { FETCH_USER_DATABASE } from '../../../redux/actions/peerDbReplicationActions'; import { breeze } from '../../../redux/store'; import './styles.css';