Fixes for Liquid module routing

This commit is contained in:
softsimon 2022-05-20 17:54:06 +04:00
parent 55f2cf06af
commit db1720e3b4
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
2 changed files with 8 additions and 2 deletions

View File

@ -500,7 +500,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
},
{
path: '**',
redirectTo: 'all'
redirectTo: 'featured'
}
]
},

View File

@ -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',