Lazy loader loading indicator
This commit is contained in:
@ -30,9 +30,7 @@ class DiscoverCategory extends React.Component{
|
||||
}
|
||||
|
||||
loadMore(){
|
||||
if (this.props.category.playlists_more){
|
||||
this.props.spotifyActions.getURL( this.props.category.playlists_more, 'SPOTIFY_CATEGORY_PLAYLISTS_LOADED', 'category:'+this.props.params.id );
|
||||
}
|
||||
this.props.spotifyActions.getURL( this.props.category.playlists_more, 'SPOTIFY_CATEGORY_PLAYLISTS_LOADED', 'category:'+this.props.params.id );
|
||||
}
|
||||
|
||||
render(){
|
||||
@ -54,7 +52,7 @@ class DiscoverCategory extends React.Component{
|
||||
<section className="grid-wrapper">
|
||||
<PlaylistGrid playlists={playlists} />
|
||||
</section>
|
||||
<LazyLoadListener loadMore={ () => this.loadMore() }/>
|
||||
<LazyLoadListener enabled={this.props.category.playlists_more} loadMore={ () => this.loadMore() }/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -21,7 +21,6 @@ class DiscoverNewReleases extends React.Component{
|
||||
}
|
||||
|
||||
loadMore(){
|
||||
if (!this.props.new_releases_more) return
|
||||
this.props.spotifyActions.getURL(this.props.new_releases_more, 'SPOTIFY_NEW_RELEASES_LOADED');
|
||||
}
|
||||
|
||||
@ -43,7 +42,7 @@ class DiscoverNewReleases extends React.Component{
|
||||
<section className="grid-wrapper">
|
||||
<AlbumGrid albums={albums} />
|
||||
</section>
|
||||
<LazyLoadListener loadMore={ () => this.loadMore() }/>
|
||||
<LazyLoadListener enabled={this.props.new_releases_more} loadMore={ () => this.loadMore() }/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user