The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

22 lines
591 B

  1. import { connect } from 'react-redux';
  2. import Upload from '../components/upload';
  3. import { undoUploadCompose, changeUploadCompose } from '../../../actions/compose';
  4. const mapStateToProps = (state, { id }) => ({
  5. media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),
  6. });
  7. const mapDispatchToProps = dispatch => ({
  8. onUndo: id => {
  9. dispatch(undoUploadCompose(id));
  10. },
  11. onDescriptionChange: (id, description) => {
  12. dispatch(changeUploadCompose(id, description));
  13. },
  14. });
  15. export default connect(mapStateToProps, mapDispatchToProps)(Upload);