var React = require('react') var Link = require('react-router').Link var Icon = require('icon.jsx') module.exports = function(boardsAPI){ return React.createClass({ getInitialState: function(){ return { connected: false, error: false, long: false } }, componentDidMount: function(){ boardsAPI.use(boards => { if(!this.isMounted()) return if(boards.isInit){ this.setState({ connected: true }) } else { setTimeout(_ => { if(this.isMounted()) this.setState({ long: true }) }, 5000) boards.getEventEmitter().on('init', err => { if(!this.isMounted()) return if(err){ this.setState({ error: true }) } else { this.setState({ connected: true }) } }) } }) }, render: function(){ var opt = require('options.jsx').get() if(this.state.error){ return (
You don't have an IPFS node running at {opt.addr}:{opt.port}
or it is not reachable.
The IPFS Boards prototype requires a full IPFS node. Please start one by following the
go-ipfs
documentation.
It's probably one of these issues:
{opt.addr}:{opt.port}
. Go to the Settings Page to configure the connection.Still can't fix it? File a issue on GitHub, we'll be happy to help!
It's taking long... there's probably something wrong
):}