{"size": 816, "ext": "js", "max_stars_repo_path": "src/routes/Search/containers/SearchResultsContainer.js", "max_stars_repo_name": "pandasoft6/playven", "max_stars_repo_stars_event_min_datetime": "2019-05-23T00:52:09.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-23T00:52:09.000Z", "max_issues_repo_path": "src/routes/Search/containers/SearchResultsContainer.js", "max_issues_repo_name": "pandasoft6/playven", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/routes/Search/containers/SearchResultsContainer.js", "max_forks_repo_name": "pandasoft6/playven", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.3846153846, "max_line_length": 74, "alphanum_fraction": 0.7794117647}
import { connect } from 'react-redux'
import SearchResults from '../components/SearchResults'
import { onCourtSelect } from '../../../actions/booking-actions'
import { show } from 'redux-modal'

const mapDispatchToProps = {
  show,
  onCourtSelect
}

const mapStateToProps = state => ({
  searchResults: state.search.searchResults,
  searching: state.searchgrid.searching,
  queryParams: state.location.query,
  pageNumber: state.search.pageNumber,
  perPage: state.search.perPage,
  allVenuesById: state.venues.allVenuesById,
  prepopulatedVenues: state.venues.prepopulatedVenues,
  allCourts: state.allCourts,
  errorMessage: state.search.errorMessage,
  selectedCourts: state.booking.selectedCourts,
  gridType: state.search.gridType
})

export default connect(mapStateToProps, mapDispatchToProps)(SearchResults)
