]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/features/report/containers/status_check_box_container.js
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';
6 const mapStateToProps
= (state
, { id
}) => ({
7 status: state
.getIn(['statuses', id
]),
8 checked: state
.getIn(['reports', 'new', 'status_ids'], Immutable
.Set()).includes(id
),
11 const mapDispatchToProps
= (dispatch
, { id
}) => ({
14 dispatch(toggleStatusReport(id
, e
.target
.checked
));
19 export default connect(mapStateToProps
, mapDispatchToProps
)(StatusCheckBox
);
This page took 0.077184 seconds and 4 git commands to generate.