import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import Header from '../../components/Header' import PlaylistGrid from '../../components/PlaylistGrid' import * as spotifyActions from '../../services/spotify/actions' class DiscoverFeatured extends React.Component{ constructor(props) { super(props); } // on render componentDidMount(){ this.props.spotifyActions.getFeaturedPlaylists(); } render(){ var playlists = [] if (this.props.featured_playlists){ for (var i = 0; i < this.props.featured_playlists.playlists.length; i++){ var uri = this.props.featured_playlists.playlists[i] if (this.props.playlists.hasOwnProperty(uri)){ playlists.push(this.props.playlists[uri]) } } } return (