2019-06-28 09:27:55 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
makeSelectPublishFormValue,
|
|
|
|
selectIsStillEditing,
|
|
|
|
selectMyClaimForUri,
|
|
|
|
selectIsResolvingPublishUris,
|
|
|
|
selectTakeOverAmount,
|
|
|
|
} from 'redux/selectors/publish';
|
|
|
|
import { doUpdatePublishForm, doPrepareEdit } from 'redux/actions/publish';
|
|
|
|
import { selectBalance } from 'lbry-redux';
|
|
|
|
import PublishPage from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
name: makeSelectPublishFormValue('name')(state),
|
|
|
|
channel: makeSelectPublishFormValue('channel')(state),
|
2019-07-01 18:29:12 +02:00
|
|
|
bid: makeSelectPublishFormValue('bid')(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
uri: makeSelectPublishFormValue('uri')(state),
|
2019-06-27 22:27:38 +02:00
|
|
|
bid: makeSelectPublishFormValue('bid')(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
isStillEditing: selectIsStillEditing(state),
|
|
|
|
isResolvingUri: selectIsResolvingPublishUris(state),
|
|
|
|
amountNeededForTakeover: selectTakeOverAmount(state),
|
|
|
|
balance: selectBalance(state),
|
|
|
|
myClaimForUri: selectMyClaimForUri(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
|
|
|
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(PublishPage);
|