var React = require('react') var Link = require('react-router').Link var UserID = require('userID.jsx') var GetIPFS = require('getipfs.jsx') var Post = require('post.jsx') module.exports = function (boardsAPI) { return React.createClass({ getInitialState: function () { return { } }, componentDidMount: function () { boardsAPI.use(boards => { this.setState({ api: boards, allowReply: boards.isInit && !boards.limited }) boards.getEventEmitter().on('init', (err, limited) => { this.setState({ api: boards, allowReply: !err && !limited }) }) }) }, getContext: function () { if (this.props.params.userid) { if (this.props.params.boardname) { return
Posted by in #{this.props.params.boardname}
} else { return
Posted by
} } else return
You are viewing a single post
}, render: function () { if (this.state.api) { return
{this.getContext()}
} else { return } } }) }