1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-24 14:44:19 +01:00

fix horrible post bug

This commit is contained in:
Enrico Fasoli 2015-12-21 16:12:19 +01:00
parent 59ba772e97
commit 3f5824b497
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ module.exports = React.createClass({
return (b.date || 0) - (a.date || 0)
},
componentWillReceiveProps (props) {
if (props.api) {
if (props.api && (this.props.board !== props.board || this.props.admin !== props.admin)) {
this.init(props.api, props)
}
},

View File

@ -29,7 +29,7 @@ module.exports = function (boardsAPI) {
<div className="text-center">
{this.getContext()}
</div>
<Post hash={this.props.params.posthash} board={this.props.params.boardname} api={this.state.api} />
<Post hash={this.props.params.posthash} board={this.props.params.boardname} api={this.state.api} adminID={this.props.params.userid} />
</div>
} else {
return <GetIPFS api={this.state.boards} />