aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-06-15 09:08:03 +0800
committerDan Finlay <dan@danfinlay.com>2017-06-15 09:08:03 +0800
commit1814721e80c057dd5da6f89ece3f2d376ca59bc1 (patch)
treeba218a96f18651b953260ec09be5f42bc1abd8e5 /ui/app/components
parent0b18a69679e2119fb2bc7ebe027312793504bd5f (diff)
downloadtangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar.gz
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar.bz2
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar.lz
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar.xz
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.tar.zst
tangerine-wallet-browser-1814721e80c057dd5da6f89ece3f2d376ca59bc1.zip
Add no tokens message
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/token-list.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js
index c9e86dd22..c560a6072 100644
--- a/ui/app/components/token-list.js
+++ b/ui/app/components/token-list.js
@@ -29,14 +29,7 @@ TokenList.prototype.render = function () {
const { userAddress } = this.props
if (isLoading) {
- return h('div', {
- style: {
- display: 'flex',
- height: '250px',
- alignItems: 'center',
- justifyContent: 'center',
- },
- }, 'Loading')
+ return this.message('Loading')
}
const network = this.props.network
@@ -71,10 +64,21 @@ TokenList.prototype.render = function () {
cursor: pointer;
}
- `)].concat(tokenViews))
+ `)].concat(tokenViews.length ? tokenViews : this.message('No Tokens Found.')))
)
}
+TokenList.prototype.message = function (body) {
+ return h('div', {
+ style: {
+ display: 'flex',
+ height: '250px',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ }, body)
+}
+
TokenList.prototype.componentDidMount = function () {
this.createFreshTokenTracker()
}