{"size": 640, "ext": "js", "max_stars_repo_path": "scripts/components/Mentors/index.js", "max_stars_repo_name": "askadev/askadev.org", "max_stars_repo_stars_event_min_datetime": "2018-02-07T12:58:27.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-28T09:11:14.000Z", "max_issues_repo_path": "scripts/components/Mentors/index.js", "max_issues_repo_name": "askadev/askadev.org", "max_issues_repo_issues_event_min_datetime": "2018-02-10T03:33:44.000Z", "max_issues_repo_issues_event_max_datetime": "2019-05-18T17:34:03.000Z", "max_forks_repo_path": "scripts/components/Mentors/index.js", "max_forks_repo_name": "askadev/askadev.org", "max_forks_repo_forks_event_min_datetime": "2018-02-25T22:48:43.000Z", "max_forks_repo_forks_event_max_datetime": "2019-08-08T21:50:41.000Z"}
{"max_stars_count": 11, "max_issues_count": 16, "max_forks_count": 6, "avg_line_length": 26.6666666667, "max_line_length": 75, "alphanum_fraction": 0.725}
import { connect } from 'react-redux';

import { makeMentorsForOptionalRegion } from '../../selectors';

import Presenter from './Presenter';

const makeMapStateToProps = () => {
  const mentorsForOptionalRegion = makeMentorsForOptionalRegion()

  const mapStateToProps = (state, ownProps) => {
    return {
      mentors: mentorsForOptionalRegion(state, ownProps),
      regions: state.regions.all,
      currentRegion: state.regions.currentRegion,
      shouldShowBio: !!ownProps.regionName || !!state.regions.currentRegion
    }
  }

  return mapStateToProps
}

const Main = connect(makeMapStateToProps)(Presenter);
export default Main;
