Browse Source

Fix lint issues

develop
Apostolos Fanakis 4 years ago
parent
commit
26707baf1d
  1. 4
      packages/concordia-app/src/components/PostCreate/index.jsx
  2. 6
      packages/concordia-app/src/components/PostList/PostListRow/index.jsx
  3. 4
      packages/concordia-app/src/options/web3Options.js
  4. 2
      packages/concordia-app/src/views/Topic/TopicView/index.jsx

4
packages/concordia-app/src/components/PostCreate/index.jsx

@ -105,7 +105,9 @@ const PostCreate = (props) => {
}); });
} }
} }
}, [createPostCacheSendStackId, postContent, postSubject, posting, transactionStack, transactions]); }, [
createPostCacheSendStackId, initialPostSubject, postContent, postSubject, posting, transactionStack, transactions,
]);
const savePost = useCallback(() => { const savePost = useCallback(() => {
if (postSubject === '') { if (postSubject === '') {

6
packages/concordia-app/src/components/PostList/PostListRow/index.jsx

@ -7,7 +7,6 @@ import {
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import moment from 'moment'; import moment from 'moment';
import { useHistory } from 'react-router';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { FETCH_USER_DATABASE } from '../../../redux/actions/peerDbReplicationActions'; import { FETCH_USER_DATABASE } from '../../../redux/actions/peerDbReplicationActions';
@ -35,7 +34,6 @@ const PostListRow = (props) => {
const posts = useSelector((state) => state.orbitData.posts); const posts = useSelector((state) => state.orbitData.posts);
const users = useSelector((state) => state.orbitData.users); const users = useSelector((state) => state.orbitData.users);
const dispatch = useDispatch(); const dispatch = useDispatch();
const history = useHistory();
const { t } = useTranslation(); const { t } = useTranslation();
useEffect(() => { useEffect(() => {
@ -150,7 +148,9 @@ const PostListRow = (props) => {
</Feed.Extra> </Feed.Extra>
</Feed.Content> </Feed.Content>
</Dimmer.Dimmable> </Dimmer.Dimmable>
), [authorAvatarLink, loading, postAuthor, postContent, postIndexInTopic, postSubject, t, timeAgo]); ), [
authorAvatarLink, loading, postAuthor, postAuthorAddress, postContent, postIndexInTopic, postSubject, t, timeAgo,
]);
}; };
PostListRow.defaultProps = { PostListRow.defaultProps = {

4
packages/concordia-app/src/options/web3Options.js

@ -3,7 +3,9 @@ import Web3 from 'web3';
const { WEB3_URL, WEB3_PORT } = process.env; const { WEB3_URL, WEB3_PORT } = process.env;
// We need fallback ws://127.0.0.1:8545 because drizzle has not the patched web3 we use here // We need fallback ws://127.0.0.1:8545 because drizzle has not the patched web3 we use here
const web3 = (WEB3_URL && WEB3_PORT) ? `ws://${WEB3_URL}:${WEB3_PORT}` : new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://127.0.0.1:8545')); const web3 = (WEB3_URL && WEB3_PORT)
? `ws://${WEB3_URL}:${WEB3_PORT}`
: new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://127.0.0.1:8545'));
const web3Options = { const web3Options = {
web3, web3,

2
packages/concordia-app/src/views/Topic/TopicView/index.jsx

@ -5,7 +5,6 @@ import {
Container, Dimmer, Icon, Image, Placeholder, Step, Container, Dimmer, Icon, Image, Placeholder, Step,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import moment from 'moment'; import moment from 'moment';
import { useHistory } from 'react-router';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { breeze, drizzle } from '../../../redux/store'; import { breeze, drizzle } from '../../../redux/store';
import { FETCH_USER_DATABASE } from '../../../redux/actions/peerDbReplicationActions'; import { FETCH_USER_DATABASE } from '../../../redux/actions/peerDbReplicationActions';
@ -38,7 +37,6 @@ const TopicView = (props) => {
const [timestamp, setTimestamp] = useState(initialTimestamp || null); const [timestamp, setTimestamp] = useState(initialTimestamp || null);
const [postIds, setPostIds] = useState(initialPostIds || null); const [postIds, setPostIds] = useState(initialPostIds || null);
const [topicSubject, setTopicSubject] = useState(null); const [topicSubject, setTopicSubject] = useState(null);
const history = useHistory();
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(() => { useEffect(() => {

Loading…
Cancel
Save