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

22 lines
716 B
JavaScript
Raw Normal View History

2018-04-02 18:03:12 +02:00
import { connect } from 'react-redux';
import { doHideNotification } from 'lbry-redux';
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(doHideNotification()),
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);