Remove price placeholder during thumbnail loading
This commit is contained in:
parent
cd9f173722
commit
7676d94729
1 changed files with 3 additions and 15 deletions
|
@ -16,29 +16,17 @@ class FilePrice extends React.PureComponent<Props> {
|
|||
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 <span className="credit-amount">PRICE</span>;
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue