{
- this.state.seeds.map((seed,index) => {
+ seeds_objects.map((seed,index) => {
var type = helpers.uriType(seed.uri)
- if (!type){
- type = 'genre'
- }
return (
{seed.name}
({type})
- this.removeSeed(index)} />
+ this.removeSeed(seed.uri)} />
)
})
}
-
this.handleSelect(e,item)} />
+ this.handleSelect(e,uri)} />
)
}
@@ -180,8 +240,10 @@ class Discover extends React.Component{
const mapStateToProps = (state, ownProps) => {
return {
- albums: state.ui.albums,
- artists: state.ui.artists,
+ albums: (state.ui.albums ? state.ui.albums : []),
+ artists: (state.ui.artists ? state.ui.artists : []),
+ tracks: (state.ui.tracks ? state.ui.tracks : []),
+ genres: (state.ui.genres ? state.ui.genres : []),
authorized: state.spotify.authorized,
load_queue: state.ui.load_queue,
quick_search_results: (state.spotify.quick_search_results ? state.spotify.quick_search_results : {artists: [], tracks: []}),