bigbuffet-rw/app/soapbox/features/compose/containers/upload_button_container.js

20 lines
497 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import { connect } from 'react-redux';
2020-03-27 13:59:38 -07:00
import { uploadCompose } from '../../../actions/compose';
import UploadButton from '../components/upload_button';
2020-03-27 13:59:38 -07:00
const mapStateToProps = state => ({
disabled: state.getIn(['compose', 'is_uploading']),
2020-03-27 13:59:38 -07:00
resetFileKey: state.getIn(['compose', 'resetFileKey']),
});
const mapDispatchToProps = dispatch => ({
onSelectFile(files) {
2020-03-27 13:59:38 -07:00
dispatch(uploadCompose(files));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(UploadButton);