2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doLoadVideo, doSetPlayingUri } from 'redux/actions/content';
|
2018-10-29 18:25:22 +01:00
|
|
|
import { doHideNotification, makeSelectMetadataForUri } from 'lbry-redux';
|
2017-12-21 22:08:54 +01:00
|
|
|
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 => ({
|
2017-09-18 04:08:43 +02:00
|
|
|
cancelPurchase: () => {
|
|
|
|
dispatch(doSetPlayingUri(null));
|
2018-10-29 18:25:22 +01:00
|
|
|
dispatch(doHideNotification());
|
2017-09-18 04:08:43 +02:00
|
|
|
},
|
2018-10-29 18:25:22 +01:00
|
|
|
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);
|