You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
726 B

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