diff --git a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx index 510ab88..758cb68 100644 --- a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx +++ b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx @@ -2,7 +2,7 @@ import React, { memo, useEffect, useMemo, useState, } from 'react'; import { - Dimmer, Grid, List, Loader, Placeholder, + Dimmer, Grid, List, Placeholder, } from 'semantic-ui-react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; @@ -43,6 +43,7 @@ const TopicListRow = (props) => { dispatch({ type: FETCH_USER_DATABASE, orbit, + dbName: 'topics', userAddress: topicAuthorAddress, }); } diff --git a/packages/concordia-app/src/redux/sagas/peerDbReplicationSaga.js b/packages/concordia-app/src/redux/sagas/peerDbReplicationSaga.js index d5e1165..ae7224a 100644 --- a/packages/concordia-app/src/redux/sagas/peerDbReplicationSaga.js +++ b/packages/concordia-app/src/redux/sagas/peerDbReplicationSaga.js @@ -10,9 +10,9 @@ import { import determineKVAddress from '../../orbit/orbitUtils'; import { FETCH_USER_DATABASE, UPDATE_ORBIT_DATA } from '../actions/peerDbReplicationActions'; -function* fetchUserDb({ orbit, userAddress }) { +function* fetchUserDb({ orbit, userAddress, dbName }) { const peerDbAddress = yield call(determineKVAddress, { - orbit, dbName: 'topics', userAddress, + orbit, dbName, userAddress, }); yield put(createOrbitDatabase(orbit, { name: peerDbAddress, type: 'keyvalue' })); diff --git a/packages/concordia-app/src/views/Topic/TopicView/index.jsx b/packages/concordia-app/src/views/Topic/TopicView/index.jsx index e9856f6..abc9f89 100644 --- a/packages/concordia-app/src/views/Topic/TopicView/index.jsx +++ b/packages/concordia-app/src/views/Topic/TopicView/index.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { - Container, Dimmer, Icon, Loader, Placeholder, Step, + Container, Dimmer, Icon, Placeholder, Step, } from 'semantic-ui-react'; import moment from 'moment'; import { breeze, drizzle } from '../../../redux/store'; @@ -49,7 +49,7 @@ const TopicView = (props) => { setTopicAuthorAddress(getTopicResults[getTopicCallHash].value[0]); setTopicAuthor(getTopicResults[getTopicCallHash].value[1]); setTimestamp(getTopicResults[getTopicCallHash].value[2]); - setPostIds(getTopicResults[getTopicCallHash].value[3]); + setPostIds(getTopicResults[getTopicCallHash].value[3].map((postId) => parseInt(postId, 10))); const topicFound = topics .find((topic) => topic.id === topicId); @@ -58,6 +58,7 @@ const TopicView = (props) => { dispatch({ type: FETCH_USER_DATABASE, orbit, + dbName: 'topics', userAddress: getTopicResults[getTopicCallHash].value[0], }); }