diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-12 06:43:07 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-12 06:43:07 +0800 |
commit | 286474ca767e955b4f7fca985d3864511fa4dfbb (patch) | |
tree | 0940c64f9829809067a34f6ac64c9be5499177e8 | |
parent | 5cbe04acab982ead39f7794547de0f045952a1b7 (diff) | |
download | dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar.gz dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar.bz2 dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar.lz dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar.xz dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.tar.zst dexon-sol-tools-286474ca767e955b4f7fca985d3864511fa4dfbb.zip |
Remove unused component
-rw-r--r-- | packages/instant/src/components/order_details.tsx | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 85761a5b9..2fcde5aa4 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -2,9 +2,7 @@ import { BuyQuoteInfo } from '@0x/asset-buyer'; import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; -import { oc } from 'ts-optchain'; -import { BIG_NUMBER_ZERO } from '../constants'; import { ColorOption } from '../style/theme'; import { BaseCurrency } from '../types'; import { buyQuoteUtil } from '../util/buy_quote'; @@ -204,50 +202,3 @@ export class TokenAmountRow extends React.Component<TokenAmountRowProps> { return TokenAmountRow.DEFAULT_TEXT; } } - -export class EthAmountRow extends React.Component<EthAmountRowProps> { - public static defaultProps = { - shouldEmphasize: false, - isEthAmountInBaseUnits: true, - }; - public render(): React.ReactNode { - const { rowLabel, ethAmount, isEthAmountInBaseUnits, shouldEmphasize, isLoading } = this.props; - - const fontWeight = shouldEmphasize ? 700 : 400; - const ethFormatter = isEthAmountInBaseUnits ? format.ethBaseUnitAmount : format.ethUnitAmount; - return ( - <Container padding="10px 0px" borderTop="1px dashed" borderColor={ColorOption.feintGrey}> - <Flex justify="space-between"> - <Text fontWeight={fontWeight} fontColor={ColorOption.grey}> - {rowLabel} - </Text> - <Container> - {this._renderUsdSection()} - <Text fontWeight={fontWeight} fontColor={ColorOption.grey}> - {ethFormatter( - ethAmount, - 4, - <Container opacity={0.5}> - <AmountPlaceholder color={ColorOption.lightGrey} isPulsating={isLoading} /> - </Container>, - )} - </Text> - </Container> - </Flex> - </Container> - ); - } - private _renderUsdSection(): React.ReactNode { - const usdFormatter = this.props.isEthAmountInBaseUnits - ? format.ethBaseUnitAmountInUsd - : format.ethUnitAmountInUsd; - const shouldHideUsdPriceSection = _.isUndefined(this.props.ethUsdPrice) || _.isUndefined(this.props.ethAmount); - return shouldHideUsdPriceSection ? null : ( - <Container marginRight="3px" display="inline-block"> - <Text fontColor={ColorOption.lightGrey}> - ({usdFormatter(this.props.ethAmount, this.props.ethUsdPrice)}) - </Text> - </Container> - ); - } -} |