lbry-desktop/src/ui/modal/modalConfirmThumbnailUpload/index.js

22 lines
709 B
JavaScript
Raw Normal View History

2018-04-02 18:03:12 +02:00
import { connect } from 'react-redux';
import { doHideModal } from 'redux/actions/app';
2018-04-02 18:03:12 +02:00
import { doUploadThumbnail, doUpdatePublishForm } from 'redux/actions/publish';
import { selectPublishFormValues } from 'redux/selectors/publish';
import ModalConfirmThumbnailUpload from './view';
const select = state => {
const publishState = selectPublishFormValues(state);
return { nsfw: publishState.nsfw };
};
const perform = dispatch => ({
closeModal: () => dispatch(doHideModal()),
2018-04-02 18:03:12 +02:00
upload: (path, nsfw = false) => dispatch(doUploadThumbnail(path, nsfw)),
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
});
2018-06-08 06:05:45 +02:00
export default connect(
select,
perform
)(ModalConfirmThumbnailUpload);