{"size": 921, "ext": "js", "max_stars_repo_path": "app/javascript/time_tables/containers/PeriodList.js", "max_stars_repo_name": "fossabot/chouette-core", "max_stars_repo_stars_event_min_datetime": "2018-05-09T06:42:32.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-16T07:22:05.000Z", "max_issues_repo_path": "app/javascript/time_tables/containers/PeriodList.js", "max_issues_repo_name": "fossabot/chouette-core", "max_issues_repo_issues_event_min_datetime": "2018-05-11T12:06:50.000Z", "max_issues_repo_issues_event_max_datetime": "2019-09-09T13:13:48.000Z", "max_forks_repo_path": "app/javascript/time_tables/containers/PeriodList.js", "max_forks_repo_name": "fossabot/chouette-core", "max_forks_repo_forks_event_min_datetime": "2018-06-01T21:03:15.000Z", "max_forks_repo_forks_event_max_datetime": "2019-02-26T10:50:13.000Z"}
{"max_stars_count": 9, "max_issues_count": 129, "max_forks_count": 3, "avg_line_length": 29.7096774194, "max_line_length": 152, "alphanum_fraction": 0.7166123779}
import { connect } from 'react-redux'
import actions from '../actions'
import PeriodListComponent from '../components/PeriodList'

const mapStateToProps = (state) => {
  return {
    metas: state.metas,
    timetable: state.timetable,
    status: state.status,
    pagination: state.pagination
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    onDeletePeriod: (index, dayTypes) => {
      dispatch(actions.deletePeriod(index, dayTypes))
    },
    onOpenEditPeriodForm: (period, index) => {
      dispatch(actions.openEditPeriodForm(period, index))
    },
    onZoomOnPeriod: (event, period, pagination, metas, timetable ) => {
      dispatch(actions.checkConfirmModal(event, actions.changePage(dispatch, period.period_start), pagination.stateChanged, dispatch, metas, timetable))
    }
  }
}

const PeriodList = connect(mapStateToProps, mapDispatchToProps)(PeriodListComponent)

export default PeriodList
