Merge pull request #1450 from mempool/nymkappa/bugfix/relative-pool-url

Use relative pipe for pie chart click event
This commit is contained in:
softsimon 2022-03-25 18:27:28 +04:00 committed by GitHub
commit fc5b769e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@
</td>
<td class="pool text-left" [class]="widget ? 'widget' : ''">
<div class="tooltip-custom">
<a class="clear-link" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
<a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.id]">
<img width="25" height="25" src="{{ block.extras.pool['logo'] }}"
onError="this.src = './resources/mining-pools/default.svg'">
<span class="pool-name">{{ block.extras.pool.name }}</span>

View File

@ -10,6 +10,7 @@ import { StorageService } from '../..//services/storage.service';
import { MiningService, MiningStats } from '../../services/mining.service';
import { StateService } from '../../services/state.service';
import { chartColors, poolsColor } from 'src/app/app.constants';
import { RelativeUrlPipe } from 'src/app/shared/pipes/relative-url/relative-url.pipe';
@Component({
selector: 'app-pool-ranking',
@ -282,7 +283,8 @@ export class PoolRankingComponent implements OnInit {
return;
}
this.zone.run(() => {
this.router.navigate(['/mining/pool/', e.data.data]);
const url = new RelativeUrlPipe(this.stateService).transform(`/mining/pool/${e.data.data}`);
this.router.navigate([url]);
});
});
}