Do not load if not needed

This commit is contained in:
Anthony Laibe 2018-08-02 12:49:49 +01:00 committed by Pascal Precht
parent 8787e72444
commit c043adf031
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 3 additions and 1 deletions

View File

@ -15,8 +15,10 @@ class BlocksContainer extends Component {
} }
componentDidMount() { componentDidMount() {
if (!this.props.blocks.data) {
this.props.fetchBlocks(); this.props.fetchBlocks();
} }
}
loadMore() { loadMore() {
this.props.fetchBlocks(this.loadMoreFrom()); this.props.fetchBlocks(this.loadMoreFrom());