From 7676d947295fc0e762db9a69796609c2a23cbd3d Mon Sep 17 00:00:00 2001 From: miikkatu Date: Wed, 2 May 2018 22:04:59 +0300 Subject: [PATCH] Remove price placeholder during thumbnail loading --- src/renderer/component/filePrice/view.jsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/renderer/component/filePrice/view.jsx b/src/renderer/component/filePrice/view.jsx index 090c93126..ca926cf6f 100644 --- a/src/renderer/component/filePrice/view.jsx +++ b/src/renderer/component/filePrice/view.jsx @@ -16,29 +16,17 @@ class FilePrice extends React.PureComponent { showFullPrice: false, }; - componentWillMount() { - this.fetchCost(this.props); - } - - componentWillReceiveProps(nextProps: Props) { - this.fetchCost(nextProps); - } - - fetchCost = (props: Props) => { - const { costInfo, fetchCostInfo, uri, fetching, claim } = props; + render() { + const { claim, costInfo, fetchCostInfo, fetching, showFullPrice, uri } = this.props; if (costInfo === undefined && !fetching && claim) { fetchCostInfo(uri); } - }; - - render() { - const { costInfo, showFullPrice } = this.props; const isEstimate = costInfo ? !costInfo.includesData : false; if (!costInfo) { - return PRICE; + return null; } return (