blob: cc6333a819dbe3c5bd948b570c06087d5d508328 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { connect } from 'react-redux';
import StatusList from '../components/status_list';
import { replyCompose } from '../actions/compose';
import { reblog, favourite } from '../actions/interactions';
const mapStateToProps = function (state, props) {
return {
statuses: state.getIn(['timelines', props.type])
};
};
const mapDispatchToProps = function (dispatch) {
return {
onReply: function (status) {
dispatch(replyCompose(status));
},
onFavourite: function (status) {
dispatch(favourite(status));
},
onReblog: function (status) {
dispatch(reblog(status));
}
};
};
export default connect(mapStateToProps, mapDispatchToProps)(StatusList);
|