2018-04-02 18:03:12 +02:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-29 18:25:22 +01:00
|
|
|
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 => ({
|
2018-10-29 18:25:22 +01:00
|
|
|
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);
|