2018-03-26 14:32:43 -07:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-29 13:23:53 -04:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
2019-06-24 23:05:46 -05:00
|
|
|
import ModalPublishSuccess from './view';
|
2021-03-24 01:22:02 -04:00
|
|
|
import { doClearPublish, makeSelectClaimForUri } from 'lbry-redux';
|
2019-04-10 17:27:12 -04:00
|
|
|
import { push } from 'connected-react-router';
|
2018-03-26 14:32:43 -07:00
|
|
|
|
2021-03-24 01:22:02 -04:00
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
2018-10-29 13:23:53 -04:00
|
|
|
closeModal: () => dispatch(doHideModal()),
|
2018-03-26 14:32:43 -07:00
|
|
|
clearPublish: () => dispatch(doClearPublish()),
|
2021-03-24 01:22:02 -04:00
|
|
|
navigate: (path) => dispatch(push(path)),
|
2018-03-26 14:32:43 -07:00
|
|
|
});
|
|
|
|
|
2021-03-24 01:22:02 -04:00
|
|
|
export default connect(select, perform)(ModalPublishSuccess);
|