Universal loadedMore for lazy-loading assets

This commit is contained in:
James Barnsley
2017-11-09 21:04:45 +13:00
parent 891dc2af7a
commit e2dbbac98b
7 changed files with 136 additions and 20 deletions

View File

@ -30,7 +30,14 @@ class DiscoverCategory extends React.Component{
}
loadMore(){
this.props.spotifyActions.getURL(this.props.category.playlists_more, 'SPOTIFY_CATEGORY_PLAYLISTS_LOADED', 'category:'+this.props.params.id );
this.props.spotifyActions.loadMore(
this.props.category.playlists_more,
null,
{
type: 'SPOTIFY_CATEGORY_PLAYLISTS_LOADED',
key: 'category:'+this.props.params.id
}
);
}
render(){

View File

@ -27,7 +27,14 @@ class DiscoverNewReleases extends React.Component{
}
loadMore(){
this.props.spotifyActions.getURL(this.props.new_releases_more, 'SPOTIFY_NEW_RELEASES_LOADED');
this.props.spotifyActions.loadMore(
this.props.new_releases_more,
null,
{
type: 'SPOTIFY_NEW_RELEASES_LOADED',
key: null
}
);
}
playAlbum(e,album){