mempool/frontend/src/app/components/blockchain/blockchain.component.ts

29 lines
739 B
TypeScript
Raw Normal View History

import { Component, OnInit, OnDestroy } from '@angular/core';
import { StateService } from 'src/app/services/state.service';
import { Subscription } from 'rxjs';
2019-07-21 17:59:47 +03:00
@Component({
selector: 'app-blockchain',
templateUrl: './blockchain.component.html',
styleUrls: ['./blockchain.component.scss']
})
export class BlockchainComponent implements OnInit, OnDestroy {
2019-07-21 17:59:47 +03:00
txTrackingLoading = false;
txShowTxNotFound = false;
2019-07-24 23:08:28 +03:00
isLoading = true;
subscription: Subscription;
2019-07-21 17:59:47 +03:00
constructor(
private stateService: StateService,
2019-07-21 17:59:47 +03:00
) {}
ngOnInit() {
this.subscription = this.stateService.isLoadingWebSocket$
.subscribe((isLoading) => this.isLoading = isLoading);
}
ngOnDestroy() {
this.subscription.unsubscribe();
2019-07-21 17:59:47 +03:00
}
}