mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-02-04 16:34:19 +01:00
fix horrible post bug
This commit is contained in:
parent
59ba772e97
commit
3f5824b497
@ -11,7 +11,7 @@ module.exports = React.createClass({
|
|||||||
return (b.date || 0) - (a.date || 0)
|
return (b.date || 0) - (a.date || 0)
|
||||||
},
|
},
|
||||||
componentWillReceiveProps (props) {
|
componentWillReceiveProps (props) {
|
||||||
if (props.api) {
|
if (props.api && (this.props.board !== props.board || this.props.admin !== props.admin)) {
|
||||||
this.init(props.api, props)
|
this.init(props.api, props)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,7 @@ module.exports = function (boardsAPI) {
|
|||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
{this.getContext()}
|
{this.getContext()}
|
||||||
</div>
|
</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>
|
</div>
|
||||||
} else {
|
} else {
|
||||||
return <GetIPFS api={this.state.boards} />
|
return <GetIPFS api={this.state.boards} />
|
||||||
|
Loading…
Reference in New Issue
Block a user