{"size": 969, "ext": "js", "max_stars_repo_path": "system/src/routes/CashFlow/containers/EditCashFlowViewContainer/index.js", "max_stars_repo_name": "axmatthew/react", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "system/src/routes/CashFlow/containers/EditCashFlowViewContainer/index.js", "max_issues_repo_name": "axmatthew/react", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "system/src/routes/CashFlow/containers/EditCashFlowViewContainer/index.js", "max_forks_repo_name": "axmatthew/react", "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": 29.3636363636, "max_line_length": 94, "alphanum_fraction": 0.7172342621}
import React, { Component } from 'react';
import { connect } from 'react-redux';
import cashFlowModule from '../../../../modules/cash-flows';
import EditCashFlowView from '../../components/EditCashFlowView';
import { baseMapStateToProps } from '../../../../common/container-helpers';

class EditCashFlowViewContainer extends Component {

  static propTypes = Object.assign({}, EditCashFlowView.propTypes, {
    params: React.PropTypes.object.isRequired,
    fetch: React.PropTypes.func.isRequired
  });

  componentDidMount() {
    this.props.fetch(this.props.params._id);
  }

  render() {
    return React.createElement(
      EditCashFlowView,
      Object.assign({}, this.props, { params: undefined, fetch: undefined })
    );
  }

}

export default connect(baseMapStateToProps.bind(null, cashFlowModule.entityUrl, 'editView'), {
  fetch: cashFlowModule.fetch,

  // Transfer to presentation component
  update: cashFlowModule.update
})(EditCashFlowViewContainer);
