Categories in full index
This commit is contained in:
@ -16,15 +16,19 @@ class DiscoverCategory extends React.Component{
|
||||
}
|
||||
|
||||
componentDidMount(){
|
||||
this.props.spotifyActions.getCategory( this.props.params.id );
|
||||
this.loadCategory()
|
||||
}
|
||||
|
||||
componentWillReceiveProps( nextProps ){
|
||||
if( nextProps.params.id != this.props.params.id ){
|
||||
this.props.spotifyActions.getCategory( nextProps.params.id );
|
||||
this.loadCategory()
|
||||
}
|
||||
}
|
||||
|
||||
loadCategory(){
|
||||
if (!this.props.category || !this.props.category.playlists_uris) this.props.spotifyActions.getCategory( this.props.params.id );
|
||||
}
|
||||
|
||||
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 );
|
||||
|
||||
Reference in New Issue
Block a user