revert commit dd8ab64 and minor cleanup for fileActions

This commit is contained in:
btzr-io 2017-10-09 19:27:35 -06:00
parent 73c2d02e38
commit 3eef5d7070

View file

@ -8,8 +8,7 @@ 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">
@ -31,22 +30,22 @@ class FileActions extends React.PureComponent {
className="no-underline" className="no-underline"
onClick={() => openModal(modals.CONFIRM_FILE_REMOVE, { uri })} onClick={() => openModal(modals.CONFIRM_FILE_REMOVE, { uri })}
/>} />}
<Link {!claimIsMine &&
button="text"
icon="icon-flag"
href={`https://lbry.io/dmca?claim_id=${claimId}`}
className="no-underline"
label={__("report")}
/>
{showSupport &&
<Link <Link
button="primary" button="text"
icon="icon-gift" icon="icon-flag"
label={__("Support")} href={`https://lbry.io/dmca?claim_id=${claimId}`}
navigate="/show" className="no-underline"
className="card__action--right no-underline" label={__("report")}
navigateParams={{ uri, tab: "tip" }}
/>} />}
<Link
button="primary"
icon="icon-gift"
label={__("Support")}
navigate="/show"
className="card__action--right no-underline"
navigateParams={{ uri, tab: "tip" }}
/>
</section> </section>
); );
} }