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:
parent
59ba772e97
commit
3f5824b497
@ -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)
|
||||
}
|
||||
},
|
||||
|
@ -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} />
|
||||
|
Loading…
Reference in New Issue
Block a user