mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add no tokens message
This commit is contained in:
parent
0b18a69679
commit
1814721e80
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user