// @flow import React, { Fragment, PureComponent } from 'react'; import * as ICONS from 'constants/icons'; import * as MODALS from 'constants/modal_types'; import Button from 'component/button'; import Spinner from 'component/spinner'; import * as PAGES from 'constants/pages'; import HelpLink from 'component/common/help-link'; import CreditAmount from 'component/common/credit-amount'; import Card from 'component/common/card'; type Props = { uri: string, claim: StreamClaim, fileInfo: FileListItem, metadata: StreamMetadata, openFolder: string => void, contentType: string, user: ?any, pendingAmount: string, openModal: (id: string, { uri: string }) => void, claimIsMine: boolean, }; class FileValues extends PureComponent { render() { const { uri, claim, metadata, openModal, pendingAmount, claimIsMine } = this.props; if (!claim || !metadata) { return {__('Empty claim or metadata info.')}; } const supportsAmount = claim && claim.meta && claim.meta.support_amount && Number(claim.meta.support_amount); return ( {__('Original Publish Amount')} {claim && claim.amount ? ( ) : (

...

)} {' '} {__('Supports and Tips')} {claimIsMine && !pendingAmount && Boolean(supportsAmount) && ( <>