mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-03-12 21:48:39 +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)
|
console.log('Initial POSTS',this.state.posts.length)
|
||||||
boards.getPostsInBoard(this.props.admin,this.props.board).on('post',(post,hash) => {
|
boards.getPostsInBoard(this.props.admin,this.props.board).on('post',(post,hash) => {
|
||||||
if(!this.isMounted()) return true
|
if(!this.isMounted()) return true
|
||||||
var posts = this.state.posts
|
this.setState({ posts: this.state.posts.concat(post) })
|
||||||
posts.push(post)
|
|
||||||
this.setState({ posts })
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
render: function(){
|
render: function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user