Browse Source

[bug:euvr] Self-hosted instance hiding subscription nav item (#1669)

pull/1672/head
Vincent Salucci 4 years ago committed by GitHub
parent
commit
e3e7fce70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/app/settings/settings.component.ts

8
src/app/settings/settings.component.ts

@ -54,7 +54,11 @@ export class SettingsComponent implements OnInit, OnDestroy { @@ -54,7 +54,11 @@ export class SettingsComponent implements OnInit, OnDestroy {
this.premium = await this.tokenService.getPremium();
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
const billing = await this.apiService.getUserBillingHistory();
this.hideSubscription = !this.premium && hasPremiumFromOrg && billing.hasNoHistory;
let billing = null;
if (!this.selfHosted) {
billing = await this.apiService.getUserBillingHistory();
}
this.hideSubscription =
!this.premium && hasPremiumFromOrg && (this.selfHosted || billing?.hasNoHistory);
}
}

Loading…
Cancel
Save