diff --git a/app/components/AppHeader.js b/app/components/AppHeader.js index daa08c0..220a78a 100644 --- a/app/components/AppHeader.js +++ b/app/components/AppHeader.js @@ -77,6 +77,7 @@ export default class AppHeader extends Component { } diff --git a/app/store/authStore.js b/app/store/authStore.js index 34fa3b8..612346d 100644 --- a/app/store/authStore.js +++ b/app/store/authStore.js @@ -78,6 +78,7 @@ class Auth { this.client.setAuthInfo(this.provider, token); this.client.setPosition(0, 0); this.authed = token; + this.password = ''; return this.client.init(); }).catch((err) => { this.setNotification({ @@ -97,6 +98,11 @@ class Auth { return new Promise((resolve, reject) => reject('Unable to login')); } + logout = action('logout', () => { + this.authed = false; + this._pokemon.clear(); + }) + savedFileCheck = action('savedFileCheck', () => { this.hasSavedData = fs.existsSync(FILENAME); });