2020-01-30 22:01:23 +01:00
|
|
|
import * as PAGES from 'constants/pages';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { makeSelectClaimForUri, makeSelectClaimIsPending, doClearPublish, doPrepareEdit } from 'lbry-redux';
|
|
|
|
import { push } from 'connected-react-router';
|
2020-01-30 23:25:15 +01:00
|
|
|
import ClaimPreviewSubtitle from './view';
|
2020-01-30 22:01:23 +01:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
pending: makeSelectClaimIsPending(props.uri)(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
beginPublish: name => {
|
|
|
|
dispatch(doClearPublish());
|
|
|
|
dispatch(doPrepareEdit({ name }));
|
|
|
|
dispatch(push(`/$/${PAGES.PUBLISH}`));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
2020-01-30 23:25:15 +01:00
|
|
|
)(ClaimPreviewSubtitle);
|