Localstorage woes again; multiple requests; creating common components

This commit is contained in:
James Barnsley
2016-10-18 21:57:29 +13:00
parent bd3ac79055
commit 51bf248ac9
14 changed files with 179 additions and 17 deletions

View File

@ -4,6 +4,8 @@ import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import TrackList from '../components/TrackList'
import AlbumGrid from '../components/AlbumGrid'
import * as spotifyActions from '../services/spotify/actions'
class Artist extends React.Component{
@ -30,6 +32,8 @@ class Artist extends React.Component{
<div>
<h3>{ this.props.spotify.artist.name }</h3>
<p>{ this.props.spotify.artist.followers.total.toLocaleString() } followers</p>
{ this.props.spotify.artist_top_tracks ? <TrackList tracks={ this.props.spotify.artist_top_tracks.tracks } /> : null }
{ this.props.spotify.artist_albums ? <AlbumGrid items={ this.props.spotify.artist_albums } /> : null }
</div>
);
}