Merge pull request #3952 from mempool/simon/connectivity-ranking-title-fix

Connectivity ranking title fix
This commit is contained in:
wiz 2023-07-13 15:58:26 +09:00 committed by GitHub
commit cff2022baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<div class="container-xl" style="min-height: 335px" [ngClass]="{'widget': widget, 'full-height': !widget}">
<h1 *ngIf="!widget" class="float-left" i18n="lightning.liquidity-ranking">Liquidity Ranking</h1>
<h1 *ngIf="!widget" class="float-left" i18n="lightning.connectivity-ranking">Connectivity Ranking</h1>
<div class="clearfix"></div>

View File

@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { map, Observable } from 'rxjs';
import { INodesRanking, ITopNodesPerChannels } from '../../../interfaces/node-api.interface';
import { SeoService } from '../../../services/seo.service';
import { StateService } from '../../../services/state.service';
import { GeolocationData } from '../../../shared/components/geolocation/geolocation.component';
import { LightningApiService } from '../../lightning-api.service';
@ -22,6 +23,7 @@ export class TopNodesPerChannels implements OnInit {
constructor(
private apiService: LightningApiService,
private stateService: StateService,
private seoService: SeoService,
) {}
ngOnInit(): void {
@ -32,6 +34,8 @@ export class TopNodesPerChannels implements OnInit {
}
if (this.widget === false) {
this.seoService.setTitle($localize`:@@c50bf442cf99f6fc5f8b687c460f33234b879869:Connectivity Ranking`);
this.topNodesPerChannels$ = this.apiService.getTopNodesByChannels$().pipe(
map((ranking) => {
for (const i in ranking) {