Bugfix and inprovments for arrow navigation.

This commit is contained in:
softsimon
2020-03-22 23:45:16 +07:00
parent 78e41fc3d3
commit bd641271a9
4 changed files with 12 additions and 14 deletions

View File

@@ -3,7 +3,6 @@ import { StateService } from 'src/app/services/state.service';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { switchMap, map } from 'rxjs/operators';
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
import { WebsocketService } from 'src/app/services/websocket.service';
@Component({
selector: 'app-mempool-block',
@@ -17,12 +16,9 @@ export class MempoolBlockComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private stateService: StateService,
private websocketService: WebsocketService,
) { }
ngOnInit(): void {
this.websocketService.want(['blocks', 'stats', 'mempool-blocks']);
this.route.paramMap.pipe(
switchMap((params: ParamMap) => {
this.mempoolBlockIndex = parseInt(params.get('id'), 10) || 0;