aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/account-detail.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/account-detail.js')
-rw-r--r--ui/app/account-detail.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js
index 411f38e5e..5ceee4fe0 100644
--- a/ui/app/account-detail.js
+++ b/ui/app/account-detail.js
@@ -249,6 +249,12 @@ AccountDetailScreen.prototype.subview = function () {
}
AccountDetailScreen.prototype.tabSections = function () {
+ var subview
+ try {
+ subview = this.props.accountDetail.subview
+ } catch (e) {
+ subview = null
+ }
return h('section.tabSection', [
@@ -257,7 +263,7 @@ AccountDetailScreen.prototype.tabSections = function () {
{ content: 'History', key: 'history' },
{ content: 'Tokens', key: 'tokens' },
],
- defaultTab: 'history',
+ defaultTab: subview || 'history',
tabSelected: (key) => {
this.setState({ tabSelection: key })
},
@@ -268,8 +274,16 @@ AccountDetailScreen.prototype.tabSections = function () {
}
AccountDetailScreen.prototype.tabSwitchView = function () {
- const tabSelection = this.state.tabSelection || 'history'
const userAddress = this.props.address
+ var subview
+ try {
+ subview = this.props.accountDetail.subview
+ return h(TokenList, { userAddress })
+ } catch (e) {
+ subview = null
+ }
+
+ const tabSelection = this.state.tabSelection || 'history'
switch (tabSelection) {
case 'tokens':