mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 14:45:28 +01:00
Merge pull request #1450 from mempool/nymkappa/bugfix/relative-pool-url
Use relative pipe for pie chart click event
This commit is contained in:
commit
fc5b769e2b
@ -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>
|
||||
|
@ -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]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user