aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-12-11 02:54:08 +0800
committerGitHub <noreply@github.com>2018-12-11 02:54:08 +0800
commitd050a1bd534695288b6da0b01e58aba1dff0e63e (patch)
treeee640acb04f545350dc5011f64f17419daef2661 /packages
parent6c86cc8ab87ae6f8d435546ec80161faee7bce74 (diff)
parentdc21c79f2b182917852649dee8f83ba621f79acf (diff)
downloaddexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar.gz
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar.bz2
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar.lz
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar.xz
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.tar.zst
dexon-sol-tools-d050a1bd534695288b6da0b01e58aba1dff0e63e.zip
Merge pull request #1411 from 0xProject/fix/instant/hide-loaders
[instant] Hide loaders when no token or buy amount is chosen
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/components/instant_heading.tsx19
1 files changed, 13 insertions, 6 deletions
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<InstantHeadingProps, {}> {
}
private _renderAmountsSection(): React.ReactNode {
- return (
- <Container>
- <Container marginBottom="5px">{this._renderPlaceholderOrAmount(this._renderEthAmount)}</Container>
- <Container opacity={0.7}>{this._renderPlaceholderOrAmount(this._renderDollarAmount)}</Container>
- </Container>
- );
+ if (
+ _.isUndefined(this.props.totalEthBaseUnitAmount) &&
+ this.props.quoteRequestState !== AsyncProcessState.Pending
+ ) {
+ return null;
+ } else {
+ return (
+ <Container>
+ <Container marginBottom="5px">{this._renderPlaceholderOrAmount(this._renderEthAmount)}</Container>
+ <Container opacity={0.7}>{this._renderPlaceholderOrAmount(this._renderDollarAmount)}</Container>
+ </Container>
+ );
+ }
}
private _renderIcon(): React.ReactNode {