The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

30 rader
844 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. import { selectStatus } from '../../../reducers/timelines';
  6. const mapStateToProps = function (state, props) {
  7. return {
  8. statuses: state.getIn(['timelines', props.type]).map(id => selectStatus(state, id))
  9. };
  10. };
  11. const mapDispatchToProps = function (dispatch) {
  12. return {
  13. onReply: function (status) {
  14. dispatch(replyCompose(status));
  15. },
  16. onFavourite: function (status) {
  17. dispatch(favourite(status));
  18. },
  19. onReblog: function (status) {
  20. dispatch(reblog(status));
  21. }
  22. };
  23. };
  24. export default connect(mapStateToProps, mapDispatchToProps)(StatusList);