don't support your own claims :(

This commit is contained in:
btzr-io 2017-10-08 16:36:04 -06:00
parent 5b9eac8c00
commit dd8ab647b8

View file

@ -8,7 +8,8 @@ class FileActions extends React.PureComponent {
const { fileInfo, uri, openModal, claimIsMine } = this.props; const { fileInfo, uri, openModal, claimIsMine } = this.props;
const claimId = fileInfo ? fileInfo.claim_id : null, const claimId = fileInfo ? fileInfo.claim_id : null,
showDelete = fileInfo && Object.keys(fileInfo).length > 0; showDelete = fileInfo && Object.keys(fileInfo).length > 0,
showSupport = !claimIsMine;
return ( return (
<section className="card__actions"> <section className="card__actions">
@ -22,14 +23,15 @@ class FileActions extends React.PureComponent {
navigateParams={{ id: claimId }} navigateParams={{ id: claimId }}
/>} />}
<FileDownloadLink uri={uri} /> <FileDownloadLink uri={uri} />
<Link {showSupport &&
button="text" <Link
icon="icon-gift" button="text"
label={__("Support")} icon="icon-gift"
navigate="/show" label={__("Support")}
className="no-underline" navigate="/show"
navigateParams={{ uri, tab: "tip" }} className="no-underline"
/> navigateParams={{ uri, tab: "tip" }}
/>}
<Link <Link
button="text" button="text"
icon="icon-flag" icon="icon-flag"