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

33 lines
1023 B
TypeScript
Raw Normal View History

2022-09-21 17:23:45 +02:00
import { Component, OnInit } from '@angular/core';
import { StateService } from '@app/services/state.service';
import { WebsocketService } from '@app/services/websocket.service';
2024-10-24 16:52:47 +09:00
import { Router, ActivatedRoute } from '@angular/router';
import { handleDemoRedirect } from '../../shared/common.utils';
@Component({
selector: 'app-graphs',
templateUrl: './graphs.component.html',
styleUrls: ['./graphs.component.scss'],
})
export class GraphsComponent implements OnInit {
2024-05-04 16:56:02 +02:00
flexWrap = false;
isMainnet = this.stateService.isMainnet();
2022-07-11 09:36:42 +02:00
constructor(
public stateService: StateService,
2024-10-24 16:52:47 +09:00
private websocketService: WebsocketService,
private router: Router,
private route: ActivatedRoute
) { }
ngOnInit(): void {
this.websocketService.want(['blocks']);
2022-07-11 09:36:42 +02:00
2024-05-04 16:56:02 +02:00
if (this.stateService.env.ACCELERATOR === true && (this.stateService.env.MINING_DASHBOARD === true || this.stateService.env.LIGHTNING === true)) {
this.flexWrap = true;
2022-07-11 09:36:42 +02:00
}
2024-10-24 16:52:47 +09:00
handleDemoRedirect(this.route, this.router);
}
}