2021-02-09 17:05:56 +01:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { selectBalance } from 'redux/selectors/wallet';
|
2021-02-09 17:05:56 +01:00
|
|
|
import {
|
|
|
|
makeSelectPublishFormValue,
|
|
|
|
selectMyClaimForUri,
|
|
|
|
selectIsResolvingPublishUris,
|
2021-08-05 22:44:52 +02:00
|
|
|
selectTakeOverAmount,
|
2021-10-08 05:47:39 +02:00
|
|
|
} from 'redux/selectors/publish';
|
|
|
|
import { doUpdatePublishForm, doPrepareEdit } from 'redux/actions/publish';
|
2021-02-09 17:05:56 +01:00
|
|
|
import PublishPage from './view';
|
|
|
|
|
2021-08-05 22:44:52 +02:00
|
|
|
const select = (state) => ({
|
2021-02-09 17:05:56 +01:00
|
|
|
name: makeSelectPublishFormValue('name')(state),
|
|
|
|
bid: makeSelectPublishFormValue('bid')(state),
|
|
|
|
uri: makeSelectPublishFormValue('uri')(state),
|
|
|
|
isResolvingUri: selectIsResolvingPublishUris(state),
|
|
|
|
balance: selectBalance(state),
|
|
|
|
myClaimForUri: selectMyClaimForUri(state),
|
2021-08-05 22:44:52 +02:00
|
|
|
amountNeededForTakeover: selectTakeOverAmount(state),
|
2021-02-09 17:05:56 +01:00
|
|
|
});
|
|
|
|
|
2021-08-05 22:44:52 +02:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
2021-02-09 17:05:56 +01:00
|
|
|
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(PublishPage);
|