mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-03-11 21:38:38 +01:00
refactored a little function
This commit is contained in:
parent
93e9b1a294
commit
23ffa38601
@ -93,9 +93,7 @@ var PostList = React.createClass({
|
||||
console.log('Initial POSTS',this.state.posts.length)
|
||||
boards.getPostsInBoard(this.props.admin,this.props.board).on('post',(post,hash) => {
|
||||
if(!this.isMounted()) return true
|
||||
var posts = this.state.posts
|
||||
posts.push(post)
|
||||
this.setState({ posts })
|
||||
this.setState({ posts: this.state.posts.concat(post) })
|
||||
})
|
||||
},
|
||||
render: function(){
|
||||
|
Loading…
Reference in New Issue
Block a user