lbry-desktop/ui/js/modal/modalRevokeClaim/view.jsx

37 lines
745 B
React
Raw Normal View History

2017-10-27 21:42:54 +02:00
import React from "react";
import { Modal } from "modal/modal";
class ModalRevokeClaim extends React.PureComponent {
constructor(props) {
super(props);
}
2017-10-30 17:25:56 +01:00
revokeClaim() {
const { name, claimId, txid, nout } = this.props;
this.props.closeModal();
this.props.abandonClaim(claimId, name, txid, nout);
2017-10-27 21:42:54 +02:00
}
render() {
2017-10-30 17:25:56 +01:00
const { msg, closeModal } = this.props;
2017-10-27 21:42:54 +02:00
return (
<Modal
isOpen={true}
contentLabel={__("Confirm Claim Revoke")}
type="confirm"
confirmButtonLabel={__("Yes, Revoke")}
2017-10-30 17:25:56 +01:00
onConfirmed={this.revokeClaim.bind(this)}
2017-10-27 21:42:54 +02:00
onAborted={closeModal}
>
<p>
2017-10-30 17:25:56 +01:00
{msg}
2017-10-27 21:42:54 +02:00
</p>
</Modal>
);
}
}
export default ModalRevokeClaim;