Bugfix and inprovments for arrow navigation.

This commit is contained in:
softsimon
2020-03-22 23:45:16 +07:00
parent 827bfcef3d
commit 9a0840afc2
4 changed files with 12 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ import { Subscription } from 'rxjs';
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
import { StateService } from 'src/app/services/state.service';
import { Router } from '@angular/router';
import { take } from 'rxjs/operators';
@Component({
selector: 'app-mempool-blocks',
@@ -69,6 +70,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
this.router.navigate(['/mempool-block/', this.markIndex - 1]);
} else {
this.stateService.blocks$
.pipe(take(8))
.subscribe((block) => {
if (this.stateService.latestBlockHeight === block.height) {
this.router.navigate(['/block/', block.id], { state: { data: { block } }});