aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-20 04:55:29 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-20 04:55:29 +0800
commit549c6afa0af15cb19249ce8cdbad92b09ae231f6 (patch)
treee8ab5fd9af0fb194d56a3448cc1359f6ef7d4ee2
parentda69ddc19b29cfca05d28084b196324e121987ea (diff)
downloaddexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar.gz
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar.bz2
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar.lz
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar.xz
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.tar.zst
dexon-sol-tools-549c6afa0af15cb19249ce8cdbad92b09ae231f6.zip
Move some layout logic out of the Identicon component
-rw-r--r--packages/website/ts/components/generate_order/asset_picker.tsx4
-rw-r--r--packages/website/ts/components/ui/identicon.tsx2
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx3
3 files changed, 6 insertions, 3 deletions
diff --git a/packages/website/ts/components/generate_order/asset_picker.tsx b/packages/website/ts/components/generate_order/asset_picker.tsx
index d7cc554c4..b43ac1f2e 100644
--- a/packages/website/ts/components/generate_order/asset_picker.tsx
+++ b/packages/website/ts/components/generate_order/asset_picker.tsx
@@ -151,12 +151,12 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
height: TILE_DIMENSION,
...tileStyles,
}}
- className="p2 mx-auto"
+ className="p2 flex flex-column items-center"
onClick={this._onChooseToken.bind(this, address)}
onMouseEnter={this._onToggleHover.bind(this, address, true)}
onMouseLeave={this._onToggleHover.bind(this, address, false)}
>
- <div className="p1 center">
+ <div className="p1">
<TokenIcon token={token} diameter={TOKEN_ICON_DIMENSION} />
</div>
<div className="center">{token.name}</div>
diff --git a/packages/website/ts/components/ui/identicon.tsx b/packages/website/ts/components/ui/identicon.tsx
index 30df995c8..cc1655962 100644
--- a/packages/website/ts/components/ui/identicon.tsx
+++ b/packages/website/ts/components/ui/identicon.tsx
@@ -23,7 +23,7 @@ export class Identicon extends React.Component<IdenticonProps, IdenticonState> {
const radius = diameter / 2;
return (
<div
- className="circle mx-auto relative transitionFix"
+ className="circle relative transitionFix"
style={{
width: diameter,
height: diameter,
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 8c8d74e58..f92ddda48 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -322,6 +322,9 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
}
private _renderTokenRow(token: Token, _index: number): React.ReactNode {
const tokenState = this.props.trackedTokenStateByAddress[token.address];
+ if (_.isUndefined(tokenState)) {
+ return null;
+ }
const tokenLink = sharedUtils.getEtherScanLinkIfExists(
token.address,
this.props.networkId,