lbry-desktop/ui/js/modal/modalAffirmPurchase/index.js
2017-11-13 16:02:23 -05:00

21 lines
683 B
JavaScript

import React from "react";
import { connect } from "react-redux";
import { doCloseModal } from "redux/actions/app";
import { doLoadVideo, doSetPlayingUri } from "redux/actions/content";
import { makeSelectMetadataForUri } from "redux/selectors/claims";
import ModalAffirmPurchase from "./view";
const select = (state, props) => ({
metadata: makeSelectMetadataForUri(props.uri)(state),
});
const perform = dispatch => ({
cancelPurchase: () => {
dispatch(doSetPlayingUri(null));
dispatch(doCloseModal());
},
closeModal: () => dispatch(doCloseModal()),
loadVideo: uri => dispatch(doLoadVideo(uri)),
});
export default connect(select, perform)(ModalAffirmPurchase);