fix: delete button for blobs

Show delete as soon as any blobs are saved.
This commit is contained in:
Thomas Zarebczan 2019-08-14 19:34:14 -04:00 committed by Sean Yesmunt
parent f6858beb68
commit c3f4d66773

View file

@ -16,9 +16,7 @@ type Props = {
class FileActions extends React.PureComponent<Props> {
render() {
const { fileInfo, uri, openModal, claimIsMine, claimId } = this.props;
const showDelete =
claimIsMine ||
(fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed === fileInfo.blobs_in_stream));
const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0));
return (
<React.Fragment>
{showDelete && (