aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/UserStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/UserStore.js')
-rw-r--r--src/stores/UserStore.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index d44208923..365336cbf 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -160,6 +160,10 @@ export default class UserStore extends Store {
160 return !!this.data.isPremium; 160 return !!this.data.isPremium;
161 } 161 }
162 162
163 @computed get isPremiumOverride() {
164 return (!this.team.plan && this.isPremium) || (this.team.state === 'expired' && this.isPremium);
165 }
166
163 @computed get isPersonal() { 167 @computed get isPersonal() {
164 if (!this.team.plan) return false; 168 if (!this.team.plan) return false;
165 const plan = getPlan(this.team.plan); 169 const plan = getPlan(this.team.plan);
@@ -168,7 +172,7 @@ export default class UserStore extends Store {
168 } 172 }
169 173
170 @computed get isPro() { 174 @computed get isPro() {
171 if ((!this.team.plan || this.team.state !== 'expired') && this.isPremium) return true; 175 if (this.isPremiumOverride) return true;
172 176
173 if ((!this.team.plan || this.team.state === 'expired')) return false; 177 if ((!this.team.plan || this.team.state === 'expired')) return false;
174 const plan = getPlan(this.team.plan); 178 const plan = getPlan(this.team.plan);