lbry-desktop/src/renderer/modal/modalAffirmPurchase/index.js

20 lines
626 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { doLoadVideo, doSetPlayingUri } from 'redux/actions/content';
import { doHideNotification, 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(doHideNotification());
},
closeModal: () => dispatch(doHideNotification()),
2017-09-08 05:15:05 +02:00
loadVideo: uri => dispatch(doLoadVideo(uri)),
2017-09-07 23:18:33 +02:00
});
export default connect(select, perform)(ModalAffirmPurchase);