import React from "react";
import Link from "component/link";
import FormFieldPrice from "component/formFieldPrice";
class TipLink extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
feeAmount: "1.00",
currency: "LBC",
};
}
handleSupportButtonClicked() {
this.resetDefaults();
this.props.onTipShow();
}
handleSendButtonClicked() {
let claim_id = this.props.claim_id;
let amount = this.state.feeAmount;
this.props.setClaimID(claim_id);
this.props.setAmount(amount);
this.props.sendSupport();
this.props.onTipHide();
}
handleSupportCancelButtonClicked() {
this.props.onTipHide();
}
handleSupportPriceChange(newValue) {
this.setState({
feeAmount: newValue.amount,
feeCurrency: newValue.currency,
});
}
resetDefaults() {
this.setState({
feeAmount: "1.00",
currency: "LBC",
});
}
render() {
const { showTipBox } = this.props;
const { feeAmount, currency } = this.state;
let tipLink = (
);
let tipBox = (