Fix broken navigation when clicking on pie chart

This commit is contained in:
nymkappa 2022-03-07 18:42:47 +01:00
parent 09e3791cee
commit 1318c4aa36
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, NgZone, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { Router } from '@angular/router';
import { EChartsOption, PieSeriesOption } from 'echarts';
@ -41,6 +41,7 @@ export class PoolRankingComponent implements OnInit {
private miningService: MiningService,
private seoService: SeoService,
private router: Router,
private zone: NgZone,
) {
}
@ -293,7 +294,9 @@ export class PoolRankingComponent implements OnInit {
if (e.data.data === 9999) { // "Other"
return;
}
this.router.navigate(['/mining/pool/', e.data.data]);
this.zone.run(() => {
this.router.navigate(['/mining/pool/', e.data.data]);
});
});
}