2019-06-28 09:27:55 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { doUpdatePublishForm, doPrepareEdit } from 'redux/actions/publish';
|
2019-06-28 09:27:55 +02:00
|
|
|
import {
|
|
|
|
makeSelectPublishFormValue,
|
|
|
|
selectIsStillEditing,
|
|
|
|
selectMyClaimForUri,
|
2021-08-05 22:44:52 +02:00
|
|
|
selectTakeOverAmount,
|
2021-10-08 05:47:39 +02:00
|
|
|
} from 'redux/selectors/publish';
|
2021-02-09 17:05:56 +01:00
|
|
|
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
|
|
|
import { doSetActiveChannel } from 'redux/actions/app';
|
2019-06-28 09:27:55 +02:00
|
|
|
import PublishPage from './view';
|
|
|
|
|
2021-02-24 07:02:19 +01:00
|
|
|
const select = (state) => ({
|
2019-06-28 09:27:55 +02:00
|
|
|
name: makeSelectPublishFormValue('name')(state),
|
2021-02-24 07:02:19 +01:00
|
|
|
uri: makeSelectPublishFormValue('uri')(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
isStillEditing: selectIsStillEditing(state),
|
|
|
|
myClaimForUri: selectMyClaimForUri(state),
|
2021-02-09 17:05:56 +01:00
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
|
|
incognito: selectIncognito(state),
|
2021-08-05 22:44:52 +02:00
|
|
|
amountNeededForTakeover: selectTakeOverAmount(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
2021-02-24 07:02:19 +01:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
2019-06-28 09:27:55 +02:00
|
|
|
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
2021-02-24 07:02:19 +01:00
|
|
|
setActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
2021-02-09 17:05:56 +01:00
|
|
|
export default connect(select, perform)(PublishPage);
|