{"size": 2018, "ext": "js", "max_stars_repo_path": "app/containers/Transaction/TransactionDetail/index.js", "max_stars_repo_name": "ChrissieFernando/wibmo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/containers/Transaction/TransactionDetail/index.js", "max_issues_repo_name": "ChrissieFernando/wibmo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/containers/Transaction/TransactionDetail/index.js", "max_forks_repo_name": "ChrissieFernando/wibmo", "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.8717948718, "max_line_length": 82, "alphanum_fraction": 0.7001982161}
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import {
  makeSelectTransaction,
  makeSelectTransactionDetail,
} from '../selector';
import {
  makeSelectLoginProfile,
  makeSelectGlobals,
} from '../../Login/selectors';
import injectReducer from '../../../utils/injectReducer';
import injectSaga from '../../../utils/injectSaga';
import { globals } from '../../Login/actions';
import TransactionDetail from '../../../components/Transaction/TransactionDetail';
import reducer from '../reducer';
import saga from '../saga';

class Transaction extends PureComponent {
  componentDidMount() {}

  render() {
    const {
      transaction,
      profile,
      history,
      match,
      globalData,
      location,
    } = this.props;
    return (
      <TransactionDetail
        globals={this.props.globals}
        transaction={transaction}
        profile={profile}
        location={location}
        history={history}
        match={match}
        globalData={globalData}
      />
    );
  }
}

Transaction.propTypes = {
  globals: PropTypes.func.isRequired,
  globalData: PropTypes.object.isRequired,
  history: PropTypes.object.isRequired,
  match: PropTypes.object.isRequired,
  location: PropTypes.object.isRequired,
  transaction: PropTypes.object.isRequired,
  profile: PropTypes.object.isRequired,
};

const mapStateToProps = createStructuredSelector({
  makeSelectTransactionDetail: makeSelectTransactionDetail(),
  transaction: makeSelectTransaction(),
  // location: makeSelectLocation(),
  profile: makeSelectLoginProfile(),
  globalData: makeSelectGlobals(),
});

const withConnect = connect(
  mapStateToProps,
  { globals },
);

const withReducer = injectReducer({ key: 'transaction', reducer });
const withSaga = injectSaga({ key: 'transaction', saga });

export default compose(
  withReducer,
  withSaga,
  withConnect,
)(Transaction);
