{"size": 677, "ext": "js", "max_stars_repo_path": "src/objective/components/ObjectiveContainer.js", "max_stars_repo_name": "sfigueiras/pomodoro", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/objective/components/ObjectiveContainer.js", "max_issues_repo_name": "sfigueiras/pomodoro", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/objective/components/ObjectiveContainer.js", "max_forks_repo_name": "sfigueiras/pomodoro", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.0740740741, "max_line_length": 82, "alphanum_fraction": 0.6971935007}
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { updateObjective } from '../actions'
import Objective from './Objective'

class ObjectiveContainer extends Component {
  render () {
    const { objective, handleChange } = this.props
    return (
      <Objective
        objective={objective}
        handleChange={handleChange}
        />
    )
  }
}

const mapStateToProps = state => ({
  objective: state.objective.value
})

const mapDispatchToProps = dispatch => ({
  handleChange: (event) => dispatch(updateObjective(parseInt(event.target.value)))
})

export default connect (mapStateToProps, mapDispatchToProps) (ObjectiveContainer)
