Add websocket service to avoid issues with blocks

This commit is contained in:
hunicus 2022-04-12 18:06:32 -04:00
parent 1348e953a6
commit 01f474628a
No known key found for this signature in database
GPG Key ID: 3AA9E3763EBB3B23

View File

@ -1,6 +1,7 @@
import { Component, OnInit, HostBinding } from '@angular/core'; import { Component, OnInit, HostBinding } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { Env, StateService } from 'src/app/services/state.service'; import { Env, StateService } from 'src/app/services/state.service';
import { WebsocketService } from 'src/app/services/websocket.service';
@Component({ @Component({
selector: 'app-docs', selector: 'app-docs',
@ -19,9 +20,11 @@ export class DocsComponent implements OnInit {
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
private stateService: StateService, private stateService: StateService,
private websocket: WebsocketService,
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.websocket.want(['blocks']);
const url = this.route.snapshot.url; const url = this.route.snapshot.url;
if( url[1].path === "faq" ) { if( url[1].path === "faq" ) {
this.activeTab = 0; this.activeTab = 0;