2019-06-28 09:27:55 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
makeSelectPublishFormValue,
|
|
|
|
selectIsStillEditing,
|
|
|
|
selectMyClaimForUri,
|
2019-07-03 04:30:34 +02:00
|
|
|
doUpdatePublishForm,
|
|
|
|
doPrepareEdit,
|
|
|
|
} from 'lbry-redux';
|
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';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
name: makeSelectPublishFormValue('name')(state),
|
|
|
|
isStillEditing: selectIsStillEditing(state),
|
|
|
|
myClaimForUri: selectMyClaimForUri(state),
|
2021-02-09 17:05:56 +01:00
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
|
|
incognito: selectIncognito(state),
|
2019-06-28 09:27:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
|
|
|
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
2021-02-09 17:05:56 +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);
|