Merge pull request #1518 from lbryio/price-display

do not display "PRICE"
This commit is contained in:
Sean Yesmunt 2018-05-29 22:43:41 -04:00 committed by GitHub
commit ef6bb67e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,20 +35,14 @@ class FilePrice extends React.PureComponent<Props> {
render() { render() {
const { costInfo, showFullPrice } = this.props; const { costInfo, showFullPrice } = this.props;
const isEstimate = costInfo ? !costInfo.includesData : false; return costInfo ? (
if (!costInfo) {
return <span className="credit-amount">PRICE</span>;
}
return (
<CreditAmount <CreditAmount
amount={costInfo.cost} amount={costInfo.cost}
isEstimate={isEstimate} isEstimate={!costInfo.includesData}
showFree showFree
showFullPrice={showFullPrice} showFullPrice={showFullPrice}
/> />
); ) : null;
} }
} }