Browse Source

Minor fixes

develop
Ezerous 6 years ago
parent
commit
7e7a728a91
  1. 4
      app/package.json
  2. 7
      app/src/components/Post.js
  3. 3
      app/src/components/Topic.js
  4. 7
      app/src/config/ipfsOptions.js
  5. 4
      app/src/redux/sagas/orbitSaga.js

4
app/package.json

@ -15,9 +15,9 @@
"orbit-db": "0.19.9", "orbit-db": "0.19.9",
"orbit-db-keystore": "0.1.0", "orbit-db-keystore": "0.1.0",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"react": "16.8.4", "react": "16.8.5",
"react-content-loader": "4.2.1", "react-content-loader": "4.2.1",
"react-dom": "16.8.4", "react-dom": "16.8.5",
"react-markdown": "4.0.6", "react-markdown": "4.0.6",
"react-redux": "6.0.1", "react-redux": "6.0.1",
"react-router-dom": "5.0.0", "react-router-dom": "5.0.0",

7
app/src/components/Post.js

@ -11,7 +11,6 @@ import { Button, Divider, Grid, Icon, Label, Transition } from 'semantic-ui-reac
import TimeAgo from 'react-timeago'; import TimeAgo from 'react-timeago';
import UserAvatar from 'react-user-avatar'; import UserAvatar from 'react-user-avatar';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import epochTimeConverter from '../helpers/EpochTimeConverter';
class Post extends Component { class Post extends Component {
constructor(props) { constructor(props) {
@ -177,9 +176,9 @@ class Post extends Component {
<span className="grey-text"> <span className="grey-text">
{postData !== null {postData !== null
&& ( && (
<TimeAgo date={epochTimeConverter( <TimeAgo date={
postData.value[3], postData.value[3]*1000
)} }
/> />
) )
} }

3
app/src/components/Topic.js

@ -8,7 +8,6 @@ import ContentLoader from 'react-content-loader';
import { Card } from 'semantic-ui-react'; import { Card } from 'semantic-ui-react';
import TimeAgo from 'react-timeago'; import TimeAgo from 'react-timeago';
import epochTimeConverter from '../helpers/EpochTimeConverter';
import { addPeerDatabase } from '../redux/actions/orbitActions'; import { addPeerDatabase } from '../redux/actions/orbitActions';
class Topic extends Component { class Topic extends Component {
@ -83,7 +82,7 @@ class Topic extends Component {
{topicData !== null {topicData !== null
&& ( && (
<TimeAgo <TimeAgo
date={epochTimeConverter(topicData.value[3])} date={topicData.value[3]*1000}
/> />
) )
} }

7
app/src/config/ipfsOptions.js

@ -8,14 +8,17 @@ const ipfsOptions = {
Addresses: { Addresses: {
Swarm: [ Swarm: [
'/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star', '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
// Use local signal server (https://github.com/libp2p/js-libp2p-websocket-star-rendezvous) // Use local signaling server (see also rendezvous script in package.json)
// (e.g. rendezvous --port=9090 --host=127.0.0.1) // For more information: https://github.com/libp2p/js-libp2p-websocket-star-rendezvous
'/ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star' '/ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star'
] ]
} }
}, },
preload: { preload: {
enabled: false enabled: false
},
init:{
emptyRepo: true
} }
}; };

4
app/src/redux/sagas/orbitSaga.js

@ -6,7 +6,7 @@ import { DRIZZLE_UTILS_SAGA_INITIALIZED } from '../actions/drizzleUtilsActions';
import { import {
ADD_PEER_DATABASE, PEER_DATABASE_ADDED, ADD_PEER_DATABASE, PEER_DATABASE_ADDED,
DATABASES_NOT_READY, DATABASES_NOT_READY,
IPFS_INITIALIZED, OPENING_PEER_DATABASE, IPFS_INITIALIZED,
UPDATE_PEERS UPDATE_PEERS
} from '../actions/orbitActions'; } from '../actions/orbitActions';
@ -73,7 +73,7 @@ function* addPeerDatabase(action) {
} }
} }
//Keeps track of connected pubsub peers in Redux store //Keeps track of currently connected pubsub peers in Redux store (for debugging purposes)
function* updatePeersState() { function* updatePeersState() {
const orbit = yield select(state => state.orbit); const orbit = yield select(state => state.orbit);
if(orbit.ready){ if(orbit.ready){

Loading…
Cancel
Save