diff --git a/package.json b/package.json index 264d768..e872c1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cryptolio", - "version": "3.2.0", + "version": "3.2.1", "private": true, "dependencies": { "@material-ui/core": "latest", diff --git a/src/Components/AssetCard.js b/src/Components/AssetCard.js index 15efbba..752d8c0 100644 --- a/src/Components/AssetCard.js +++ b/src/Components/AssetCard.js @@ -81,25 +81,37 @@ class AssetCard extends Component { ? ( {this.props.asset.name ) : + const percentChanges = + ( + + + + + + ) + const assetInfo = price ? ( - - {renderStyle === 'compact' - ? {Util.getLocalizedPrice(price, this.props.settings)} - : Price: {Util.getLocalizedPrice(price, this.props.settings)}} - {renderStyle === 'compact' - ? {Util.getCurrencySymbol(this.props.settings.currency) + abbreviate(this.props.asset.market_cap, 2, ['K', 'M', 'B', 'T'])} - : Market Cap: {Util.getCurrencySymbol(this.props.settings.currency) + abbreviate(this.props.asset.market_cap, 2, ['K', 'M', 'B', 'T'])}} - - - ) +
+ + {renderStyle === 'compact' + ? {Util.getLocalizedPrice(price, this.props.settings)} + : Price: {Util.getLocalizedPrice(price, this.props.settings)}} + {renderStyle === 'compact' + ? {Util.getCurrencySymbol(this.props.settings.currency) + abbreviate(this.props.asset.market_cap, 2, ['K', 'M', 'B', 'T'])} + : Market Cap: {Util.getCurrencySymbol(this.props.settings.currency) + abbreviate(this.props.asset.market_cap, 2, ['K', 'M', 'B', 'T'])}} + + + {renderStyle === 'compact' ? percentChanges : null} +
+ ) : const assetName = @@ -107,14 +119,6 @@ class AssetCard extends Component { ? `${this.props.asset.name} (${this.props.asset.symbol})` : - const percentChanges = - ( -
- - -
- ) - return ( (window.innerWidth <= 760 && event.target.tagName !== 'INPUT') ? this.toggleSettings() : null}> @@ -140,15 +144,15 @@ class AssetCard extends Component { } classes={ - renderStyle === 'compact' - ? null - : { - action: 'm-0 p-2', - root: 'h-0 p-0' - } -} + renderStyle === 'compact' + ? null + : { + action: 'm-0 p-2', + root: 'h-0 p-0' + } + } subheader={renderStyle === 'compact' ? assetInfo : null} - title={renderStyle === 'compact' ? assetName : null} + title={renderStyle === 'compact' ? {assetName} : null} /> { renderStyle !== 'compact' @@ -162,13 +166,11 @@ class AssetCard extends Component { ) : null } -