Channel component

This commit is contained in:
softsimon
2022-05-01 03:01:27 +04:00
parent 1c3570113e
commit 5374fcbe9a
23 changed files with 536 additions and 59 deletions

View File

@@ -0,0 +1,23 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { LightningApiService } from '../lightning-api.service';
@Component({
selector: 'app-channels-list',
templateUrl: './channels-list.component.html',
styleUrls: ['./channels-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ChannelsListComponent implements OnChanges {
@Input() publicKey: string;
channels$: Observable<any[]>;
constructor(
private lightningApiService: LightningApiService,
) { }
ngOnChanges(): void {
this.channels$ = this.lightningApiService.getChannelsByNodeId$(this.publicKey);
}
}