2018-04-02 18:39:00 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-17 10:36:14 +02:00
|
|
|
import { selectPublishFormValues, selectMyClaimForUri } from 'redux/selectors/publish';
|
|
|
|
import { selectFileInfosByOutpoint } from 'redux/selectors/file_info';
|
|
|
|
import { doUpdatePublishForm, doResetThumbnailStatus } from 'redux/actions/publish';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2019-06-28 09:27:55 +02:00
|
|
|
import PublishPage from './view';
|
|
|
|
|
2021-09-13 17:40:31 +02:00
|
|
|
const select = (state) => ({
|
2019-06-28 09:27:55 +02:00
|
|
|
...selectPublishFormValues(state),
|
2019-09-03 07:23:31 +02:00
|
|
|
fileInfos: selectFileInfosByOutpoint(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
myClaimForUri: selectMyClaimForUri(state),
|
|
|
|
});
|
2018-04-02 18:39:00 +02:00
|
|
|
|
2021-09-13 17:40:31 +02:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
2019-06-28 09:27:55 +02:00
|
|
|
resetThumbnailStatus: () => dispatch(doResetThumbnailStatus()),
|
2018-10-29 18:23:53 +01:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
2018-04-02 18:39:00 +02:00
|
|
|
});
|
|
|
|
|
2021-09-13 17:40:31 +02:00
|
|
|
export default connect(select, perform)(PublishPage);
|