Merge pull request #6163 from mempool/hunicus/fix-enterprise-cta

Correct enterprise upsell link in docs
This commit is contained in:
wiz 2025-12-12 18:11:47 +09:00 committed by GitHub
commit f1abf3146b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<div id="enterprise-cta-desktop" *ngIf="officialMempoolInstance">
<p>Get higher API limits with Mempool Enterprise®</p>
<a class="btn btn-small btn-purple" href="/enterprise">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
<a class="btn btn-small btn-purple" [href]="[ isMempoolSpaceBuild ? '/enterprise' : 'https://mempool.space/enterprise']" [target]="isMempoolSpaceBuild ? '' : 'blank'">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
</div>
<div *ngFor="let item of tabData">
<p *ngIf="( item.type === 'category' ) && ( item.showConditions.indexOf(network.val) > -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ))">{{ item.title }}</p>

View file

@ -21,6 +21,7 @@ export class ApiDocsNavComponent implements OnInit {
tabData: any[];
auditEnabled: boolean;
officialMempoolInstance: boolean;
isMempoolSpaceBuild: boolean;
runningElectrs: boolean;
constructor(
@ -30,6 +31,7 @@ export class ApiDocsNavComponent implements OnInit {
ngOnInit(): void {
this.env = this.stateService.env;
this.officialMempoolInstance = this.env.OFFICIAL_MEMPOOL_SPACE;
this.isMempoolSpaceBuild = this.stateService.isMempoolSpaceBuild;
this.stateService.backend$.pipe(takeUntil(this.destroy$)).subscribe((backend) => {
this.runningElectrs = !!(backend == 'esplora');
});

View file

@ -43,7 +43,7 @@
<p>Get higher API limits with <span class="no-line-break">Mempool Enterprise®</span></p>
<div class="button-group">
<a class="btn btn-small btn-secondary" (click)="showMobileEnterpriseUpsell = false">No Thanks</a>
<a class="btn btn-small btn-purple" href="https://mempool.space/enterprise">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
<a class="btn btn-small btn-purple" [href]="[ isMempoolSpaceBuild ? '/enterprise' : 'https://mempool.space/enterprise']" [target]="isMempoolSpaceBuild ? '' : 'blank'">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
</div>
</div>
@ -120,7 +120,7 @@
<p>Get higher API limits with <span class="no-line-break">Mempool Enterprise®</span></p>
<div class="button-group">
<a class="btn btn-small btn-secondary" (click)="showMobileEnterpriseUpsell = false">No Thanks</a>
<a class="btn btn-small btn-purple" href="https://mempool.space/enterprise">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
<a class="btn btn-small btn-purple" [href]="[ isMempoolSpaceBuild ? '/enterprise' : 'https://mempool.space/enterprise']" [target]="isMempoolSpaceBuild ? '' : 'blank'">More Info <fa-icon [icon]="['fas', 'angle-right']"></fa-icon></a>
</div>
</div>