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') var Comments = require('comment.jsx').Comments module.exports = function (boardsAPI) { return React.createClass({ getInitialState: function () { return { } }, componentDidMount: function () { boardsAPI.use(boards => { boards.getEventEmitter().on('init', err => { if (!err && this.isMounted()) { this.init(boards) } }) if (this.isMounted() && boards.isInit) { this.init(boards) } boards.init() }) }, init: function (boards) { if (this.state.init) return this.setState({ api: boards }) }, 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 } } }) }