lbry-desktop/ui/component/claimPreviewSubtitle/index.js

21 lines
670 B
JavaScript
Raw Normal View History

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';
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
pending: makeSelectClaimIsPending(props.uri)(state),
});
const perform = dispatch => ({
beginPublish: name => {
dispatch(doClearPublish());
dispatch(doPrepareEdit({ name }));
2020-07-23 19:02:07 +02:00
dispatch(push(`/$/${PAGES.UPLOAD}`));
},
});
2020-07-23 19:02:07 +02:00
export default connect(select, perform)(ClaimPreviewSubtitle);