// @flow import * as ICONS from 'constants/icons'; import { SITE_NAME } from 'config'; import React from 'react'; import ButtonTransaction from 'component/common/transaction-link'; import CreditAmount from 'component/common/credit-amount'; import DateTime from 'component/dateTime'; import Button from 'component/button'; import Spinner from 'component/spinner'; import { toCapitalCase } from 'util/string'; import { buildURI, parseURI } from 'util/lbryURI'; import * as TXO from 'constants/txo_list'; import * as ABANDON_STATES from 'constants/abandon_states'; import UriIndicator from 'component/uriIndicator'; type Props = { txo: Txo, revokeClaim: (Txo, (string) => void) => void, isRevokeable: boolean, reward: ?{ reward_title: string, }, signingChannel: ChannelClaim, }; type State = { abandonState: string, }; class TransactionListTableItem extends React.PureComponent { constructor() { super(); this.state = { abandonState: ABANDON_STATES.READY }; (this: any).abandonClaim = this.abandonClaim.bind(this); (this: any).getLink = this.getLink.bind(this); } getLink(type: string, tip: boolean, valueType: string) { const { abandonState } = this.state; if (type === 'claim' && valueType !== 'repost') { return null; } if (this.state.abandonState === ABANDON_STATES.PENDING) { return ; } if (tip && type === TXO.SUPPORT) { return (