Merge pull request #1690 from mempool/simon/liquid-routing-fix
Fixes for Liquid module routing
This commit is contained in:
commit
774cd98aa2
@ -500,7 +500,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
redirectTo: 'all'
|
||||
redirectTo: 'featured'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -38,7 +38,7 @@
|
||||
<a class="nav-link" [routerLink]="['/blocks' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'cubes']" [fixedWidth]="true" i18n-title="master-page.blocks" title="Blocks"></fa-icon></a>
|
||||
</li>
|
||||
<li class="nav-item" routerLinkActive="active" id="btn-graphs">
|
||||
<a class="nav-link" [routerLink]="['/graphs/mempool' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'chart-area']" [fixedWidth]="true" i18n-title="master-page.graphs" title="Graphs"></fa-icon></a>
|
||||
<a class="nav-link" [routerLink]="['/graphs' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'chart-area']" [fixedWidth]="true" i18n-title="master-page.graphs" title="Graphs"></fa-icon></a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-lg-block" routerLinkActive="active" id="btn-tv">
|
||||
<a class="nav-link" [routerLink]="['/tv' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'tv']" [fixedWidth]="true" i18n-title="master-page.tvview" title="TV view"></fa-icon></a>
|
||||
|
@ -7,6 +7,7 @@ import { BlockSizesWeightsGraphComponent } from '../components/block-sizes-weigh
|
||||
import { GraphsComponent } from '../components/graphs/graphs.component';
|
||||
import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component';
|
||||
import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component';
|
||||
import { LiquidMasterPageComponent } from '../components/liquid-master-page/liquid-master-page.component';
|
||||
import { MasterPageComponent } from '../components/master-page/master-page.component';
|
||||
import { MempoolBlockComponent } from '../components/mempool-block/mempool-block.component';
|
||||
import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component';
|
||||
@ -17,10 +18,15 @@ import { StatisticsComponent } from '../components/statistics/statistics.compone
|
||||
import { TelevisionComponent } from '../components/television/television.component';
|
||||
import { DashboardComponent } from '../dashboard/dashboard.component';
|
||||
|
||||
const browserWindow = window || {};
|
||||
// @ts-ignore
|
||||
const browserWindowEnv = browserWindow.__env || {};
|
||||
const isLiquid = browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MasterPageComponent,
|
||||
component: isLiquid ? LiquidMasterPageComponent : MasterPageComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'mining/pool/:slug',
|
||||
@ -82,6 +88,10 @@ const routes: Routes = [
|
||||
path: 'mining/block-sizes-weights',
|
||||
component: BlockSizesWeightsGraphComponent,
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'mempool',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user