[footer] only show cta if official && ACCELERATOR

This commit is contained in:
nymkappa 2023-08-28 16:20:30 +02:00
parent 3060aecddb
commit bbd1f088d1
No known key found for this signature in database
GPG key ID: E155910B16E8BD04
2 changed files with 4 additions and 2 deletions

View file

@ -21,12 +21,12 @@
<div class="selector"> <div class="selector">
<app-rate-unit-selector></app-rate-unit-selector> <app-rate-unit-selector></app-rate-unit-selector>
</div> </div>
<a *ngIf="officialMempoolSpace" class="btn btn-purple sponsor d-none d-sm-flex justify-content-center" [routerLink]="['/login' | relativeUrl]"> <a *ngIf="servicesEnabled" class="btn btn-purple sponsor d-none d-sm-flex justify-content-center" [routerLink]="['/login' | relativeUrl]">
<span *ngIf="loggedIn" i18n="shared.my-account">My Account</span> <span *ngIf="loggedIn" i18n="shared.my-account">My Account</span>
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In / Sign Up</span> <span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In / Sign Up</span>
</a> </a>
</div> </div>
<a *ngIf="officialMempoolSpace" class="btn btn-purple sponsor d-flex d-sm-none justify-content-center ml-auto mr-auto mt-3 mb-2" [routerLink]="['/login' | relativeUrl]"> <a *ngIf="servicesEnabled" class="btn btn-purple sponsor d-flex d-sm-none justify-content-center ml-auto mr-auto mt-3 mb-2" [routerLink]="['/login' | relativeUrl]">
<span *ngIf="loggedIn" i18n="shared.my-account">My Account</span> <span *ngIf="loggedIn" i18n="shared.my-account">My Account</span>
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In / Sign Up</span> <span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In / Sign Up</span>
</a> </a>

View file

@ -30,6 +30,7 @@ export class GlobalFooterComponent implements OnInit {
loggedIn = false; loggedIn = false;
urlSubscription: Subscription; urlSubscription: Subscription;
isServicesPage = false; isServicesPage = false;
servicesEnabled = false;
constructor( constructor(
public stateService: StateService, public stateService: StateService,
@ -44,6 +45,7 @@ export class GlobalFooterComponent implements OnInit {
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
this.isServicesPage = this.router.url.includes('/services/'); this.isServicesPage = this.router.url.includes('/services/');
this.env = this.stateService.env; this.env = this.stateService.env;