import React from "react"; import LinkTransaction from "component/linkTransaction"; import { CreditAmount } from "component/common"; import DateTime from "component/dateTime"; import Link from "component/link"; import lbryuri from "lbryuri"; class TransactionListItem extends React.PureComponent { abandonClaim(abandonData) { this.props.revokeClaim(abandonData); } render() { const { reward, transaction, isRevokeable } = this.props; const { amount, claim_id: claimId, claim_name: name, date, fee, txid, type, nout, } = transaction; const abandonData = { name: name, claimId: claimId, txid: txid, nout: nout, }; const dateFormat = { month: "short", day: "numeric", year: "numeric", }; return ( {date ?
: {__("(Transaction pending)")} }
{fee != 0 && } {type} {reward && {__("Reward: %s", reward.reward_title)} } {name && claimId && {name} } {isRevokeable && this.abandonClaim(abandonData)}> {__("Revoke")} } ); } } export default TransactionListItem;