UI to prevent suspended users viewing the application

This commit is contained in:
Jori Lallo
2018-03-04 22:18:23 -08:00
parent 1c2b3e992e
commit 1a8ca20fce
8 changed files with 49 additions and 9 deletions

View File

@ -14,6 +14,7 @@ class AuthStore {
@observable token: ?string;
@observable oauthState: string;
@observable isLoading: boolean = false;
@observable isSuspended: boolean = false;
/* Computed */
@ -43,8 +44,9 @@ class AuthStore {
this.team = res.data.team;
});
} catch (err) {
// Failure to update user info is a non-fatal error.
console.error(err);
if (err.data.error === 'user_suspended') {
this.isSuspended = true;
}
}
};