lbry-desktop/ui/modal/modalAffirmPurchase/index.js

27 lines
696 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2019-08-02 23:03:26 +02:00
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
import { doHideModal } from 'redux/actions/app';
import { makeSelectMetadataForUri } from 'lbry-redux';
import ModalAffirmPurchase from './view';
2017-09-07 23:18:33 +02:00
2017-09-08 05:15:05 +02:00
const select = (state, props) => ({
metadata: makeSelectMetadataForUri(props.uri)(state),
2017-09-07 23:18:33 +02:00
});
const perform = dispatch => ({
cancelPurchase: () => {
dispatch(doSetPlayingUri(null));
dispatch(doHideModal());
},
closeModal: () => dispatch(doHideModal()),
2019-08-13 07:35:13 +02:00
loadVideo: uri => {
dispatch(doSetPlayingUri(uri));
dispatch(doPlayUri(uri, true));
},
2017-09-07 23:18:33 +02:00
});
export default connect(
select,
perform
)(ModalAffirmPurchase);