summaryrefslogtreecommitdiff
path: root/ui/app/components/main_panel/index.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-11-08 13:56:15 -0800
committerelijah <elijah@riseup.net>2016-11-08 13:56:15 -0800
commit54613799b6277cfaf5636f9a193a70622ba0c0ae (patch)
treec5d4fa6a9582c675433a4c3da1475a1eed450a18 /ui/app/components/main_panel/index.js
parent9d845e98a2a5cda8aaa22f581e28506a627dca43 (diff)
ui: disable account remove button when appropriate
Diffstat (limited to 'ui/app/components/main_panel/index.js')
-rw-r--r--ui/app/components/main_panel/index.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/app/components/main_panel/index.js b/ui/app/components/main_panel/index.js
index 19485358..2949b1b3 100644
--- a/ui/app/components/main_panel/index.js
+++ b/ui/app/components/main_panel/index.js
@@ -50,11 +50,14 @@ export default class MainPanel extends React.Component {
removeAccount(account) {
Account.remove(account).then(
newActiveAccount => {
- console.log(newActiveAccount)
- this.setState({
- account: newActiveAccount,
- accounts: Account.list
- })
+ if (newActiveAccount == null) {
+ App.start()
+ } else {
+ this.setState({
+ account: newActiveAccount,
+ accounts: Account.list
+ })
+ }
},
error => {
console.log(error)