Discover sections
This commit is contained in:
@ -22,18 +22,15 @@ class LibraryAlbums extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if( this.props.spotify.libraryAlbums ){
|
||||
return (
|
||||
<div>
|
||||
<Header
|
||||
icon="cd"
|
||||
title="My albums"
|
||||
/>
|
||||
<AlbumGrid albums={this.props.spotify.libraryAlbums.items} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
return (
|
||||
<div className="view library-albums-view">
|
||||
<Header
|
||||
icon="cd"
|
||||
title="My albums"
|
||||
/>
|
||||
{ this.props.spotify.library_albums ? <AlbumGrid albums={this.props.spotify.library_albums.items} /> : null }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,18 +22,15 @@ class LibraryArtists extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if( this.props.spotify.libraryArtists ){
|
||||
return (
|
||||
<div>
|
||||
<Header
|
||||
icon="mic"
|
||||
title="My artists"
|
||||
/>
|
||||
<ArtistGrid artists={this.props.spotify.libraryArtists.artists.items} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
return (
|
||||
<div className="view library-artists-view">
|
||||
<Header
|
||||
icon="mic"
|
||||
title="My artists"
|
||||
/>
|
||||
{ this.props.spotify.library_artists ? <ArtistGrid artists={this.props.spotify.library_artists.artists.items} /> : null }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ class LibraryPlaylists extends React.Component{
|
||||
Object.assign(playlists, this.props.mopidy.playlists)
|
||||
}
|
||||
|
||||
if( this.props.spotify.libraryPlaylists ){
|
||||
Object.assign(playlists, this.props.spotify.libraryPlaylists.items)
|
||||
if( this.props.spotify.library_playlists ){
|
||||
Object.assign(playlists, this.props.spotify.library_playlists.items)
|
||||
}
|
||||
|
||||
return playlists;
|
||||
@ -67,7 +67,7 @@ class LibraryPlaylists extends React.Component{
|
||||
|
||||
render(){
|
||||
return (
|
||||
<div>
|
||||
<div className="view library-playlists-view">
|
||||
<Header
|
||||
icon="playlist"
|
||||
title="My playlists"
|
||||
|
||||
@ -22,15 +22,12 @@ class LibraryTracks extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if( this.props.spotify.libraryTracks ){
|
||||
return (
|
||||
<div>
|
||||
<Header icon="music" title="My tracks" />
|
||||
<TrackList tracks={this.props.spotify.libraryTracks.items} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
return (
|
||||
<div className="view library-tracks-view">
|
||||
<Header icon="music" title="My tracks" />
|
||||
{ this.props.spotify.library_tracks ? <TrackList tracks={this.props.spotify.library_tracks.items} /> : null }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user