From dc21c79f2b182917852649dee8f83ba621f79acf Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 8 Dec 2018 09:48:17 -0800 Subject: fix(instant): hide loaders when no token or buy amount is chosen --- packages/instant/src/components/instant_heading.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 117f9dd5f..816cc5c33 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -61,12 +61,19 @@ export class InstantHeading extends React.Component { } private _renderAmountsSection(): React.ReactNode { - return ( - - {this._renderPlaceholderOrAmount(this._renderEthAmount)} - {this._renderPlaceholderOrAmount(this._renderDollarAmount)} - - ); + if ( + _.isUndefined(this.props.totalEthBaseUnitAmount) && + this.props.quoteRequestState !== AsyncProcessState.Pending + ) { + return null; + } else { + return ( + + {this._renderPlaceholderOrAmount(this._renderEthAmount)} + {this._renderPlaceholderOrAmount(this._renderDollarAmount)} + + ); + } } private _renderIcon(): React.ReactNode { -- cgit v1.2.3