The code powering m.abunchtell.com https://m.abunchtell.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

20 行
591 B

  1. import { connect } from 'react-redux';
  2. import StatusCheckBox from '../components/status_check_box';
  3. import { toggleStatusReport } from '../../../actions/reports';
  4. import Immutable from 'immutable';
  5. const mapStateToProps = (state, { id }) => ({
  6. status: state.getIn(['statuses', id]),
  7. checked: state.getIn(['reports', 'new', 'status_ids'], Immutable.Set()).includes(id)
  8. });
  9. const mapDispatchToProps = (dispatch, { id }) => ({
  10. onToggle (e) {
  11. dispatch(toggleStatusReport(id, e.target.checked));
  12. }
  13. });
  14. export default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);