diff --git a/src/public/js/components/shows/list.js b/src/public/js/components/shows/list.js index 1323f58..bca5c00 100644 --- a/src/public/js/components/shows/list.js +++ b/src/public/js/components/shows/list.js @@ -1,7 +1,8 @@ import React from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' -import * as actionCreators from '../../actions/actionCreators' +import { selectShow, addShowToWishlist, + deleteFromWishlist, getShowDetails } from '../../actions/actionCreators' import ListDetails from '../list/details' import ListPosters from '../list/posters' @@ -11,15 +12,10 @@ function mapStateToProps(state) { return { showStore: state.showStore }; } const mapDispatchToProps = (dispatch) => - bindActionCreators(actionCreators, dispatch) + bindActionCreators({ selectShow, addShowToWishlist, + deleteFromWishlist, getShowDetails }, dispatch) class ShowList extends React.Component { - componentWillMount() { - if (this.props.showsUrl) { - this.props.fetchShows(this.props.showsUrl); - return - } - } render() { const shows = this.props.showStore.shows; const selectedShowId = this.props.showStore.selectedImdbId; @@ -37,9 +33,7 @@ class ShowList extends React.Component { formModel="showStore" filterControlModel="showStore.filter" filterControlPlaceHolder="Filter shows..." - fetchExploreOptions={this.props.getShowExploreOptions} exploreOptions={this.props.showStore.exploreOptions} - explore={this.props.exploreShows} selectedImdbId={selectedShowId} filter={this.props.showStore.filter} perPage={this.props.showStore.perPage}