2017-09-07 23:18:33 +02:00
|
|
|
import React from "react";
|
|
|
|
import FilePrice from "component/filePrice";
|
|
|
|
import { Modal } from "modal/modal";
|
|
|
|
|
|
|
|
class ModalAffirmPurchase extends React.PureComponent {
|
2017-09-08 05:15:05 +02:00
|
|
|
onAffirmPurchase() {
|
|
|
|
this.props.closeModal();
|
|
|
|
this.props.loadVideo(this.props.uri);
|
|
|
|
}
|
|
|
|
|
2017-09-07 23:18:33 +02:00
|
|
|
render() {
|
2017-09-18 04:08:43 +02:00
|
|
|
const { cancelPurchase, metadata: { title }, uri } = this.props;
|
2017-09-07 23:18:33 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
type="confirm"
|
2017-09-08 05:15:05 +02:00
|
|
|
isOpen={true}
|
2017-09-07 23:18:33 +02:00
|
|
|
contentLabel={__("Confirm Purchase")}
|
|
|
|
onConfirmed={this.onAffirmPurchase.bind(this)}
|
2017-09-18 04:08:43 +02:00
|
|
|
onAborted={cancelPurchase}
|
2017-09-07 23:18:33 +02:00
|
|
|
>
|
|
|
|
{__("This will purchase")} <strong>{title}</strong> {__("for")}{" "}
|
|
|
|
<strong>
|
|
|
|
<FilePrice uri={uri} showFullPrice={true} look="plain" />
|
|
|
|
</strong>{" "}
|
|
|
|
{__("credits")}.
|
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalAffirmPurchase;
|