Split Block component into separate module

This commit is contained in:
Mononaut 2023-11-08 00:09:23 +00:00
parent 27077dcd6c
commit b5a8687b6a
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
3 changed files with 53 additions and 54 deletions

View File

@ -3,7 +3,6 @@ import { Routes, RouterModule } from '@angular/router';
import { AppPreloadingStrategy } from './app.preloading-strategy' import { AppPreloadingStrategy } from './app.preloading-strategy'
import { StartComponent } from './components/start/start.component'; import { StartComponent } from './components/start/start.component';
import { TransactionComponent } from './components/transaction/transaction.component'; import { TransactionComponent } from './components/transaction/transaction.component';
import { BlockComponent } from './components/block/block.component';
import { BlockViewComponent } from './components/block-view/block-view.component'; import { BlockViewComponent } from './components/block-view/block-view.component';
import { MempoolBlockViewComponent } from './components/mempool-block-view/mempool-block-view.component'; import { MempoolBlockViewComponent } from './components/mempool-block-view/mempool-block-view.component';
import { ClockComponent } from './components/clock/clock.component'; import { ClockComponent } from './components/clock/clock.component';
@ -100,16 +99,8 @@ let routes: Routes = [
{ {
path: 'block', path: 'block',
component: StartComponent, component: StartComponent,
data: { networkSpecific: true }, data: { preload: true, networkSpecific: true },
children: [ loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
{
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
},
],
}, },
{ {
path: 'docs', path: 'docs',
@ -209,17 +200,9 @@ let routes: Routes = [
}, },
{ {
path: 'block', path: 'block',
data: { networkSpecific: true },
component: StartComponent, component: StartComponent,
children: [ data: { preload: true, networkSpecific: true },
{ loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
},
],
}, },
{ {
path: 'docs', path: 'docs',
@ -319,17 +302,9 @@ let routes: Routes = [
}, },
{ {
path: 'block', path: 'block',
data: { networkSpecific: true },
component: StartComponent, component: StartComponent,
children: [ data: { preload: true, networkSpecific: true },
{ loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
},
],
}, },
{ {
path: 'docs', path: 'docs',
@ -466,17 +441,9 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
}, },
{ {
path: 'block', path: 'block',
data: { networkSpecific: true },
component: StartComponent, component: StartComponent,
children: [ data: { preload: true, networkSpecific: true },
{ loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
},
],
}, },
{ {
path: 'assets', path: 'assets',
@ -584,17 +551,9 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
}, },
{ {
path: 'block', path: 'block',
data: { networkSpecific: true },
component: StartComponent, component: StartComponent,
children: [ data: { preload: true, networkSpecific: true },
{ loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
},
],
}, },
{ {
path: 'assets', path: 'assets',

View File

@ -0,0 +1,43 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { BlockComponent } from './block.component';
import { SharedModule } from '../../shared/shared.module';
const routes: Routes = [
{
path: ':id',
component: BlockComponent,
data: {
ogImage: true
}
}
];
@NgModule({
imports: [
RouterModule.forChild(routes)
],
exports: [
RouterModule
]
})
export class BlockRoutingModule { }
@NgModule({
imports: [
CommonModule,
BlockRoutingModule,
SharedModule,
],
declarations: [
BlockComponent,
]
})
export class BlockModule { }

View File

@ -47,7 +47,6 @@ import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
import { StartComponent } from '../components/start/start.component'; import { StartComponent } from '../components/start/start.component';
import { TransactionComponent } from '../components/transaction/transaction.component'; import { TransactionComponent } from '../components/transaction/transaction.component';
import { TransactionsListComponent } from '../components/transactions-list/transactions-list.component'; import { TransactionsListComponent } from '../components/transactions-list/transactions-list.component';
import { BlockComponent } from '../components/block/block.component';
import { BlockOverviewGraphComponent } from '../components/block-overview-graph/block-overview-graph.component'; import { BlockOverviewGraphComponent } from '../components/block-overview-graph/block-overview-graph.component';
import { BlockOverviewTooltipComponent } from '../components/block-overview-tooltip/block-overview-tooltip.component'; import { BlockOverviewTooltipComponent } from '../components/block-overview-tooltip/block-overview-tooltip.component';
import { AddressComponent } from '../components/address/address.component'; import { AddressComponent } from '../components/address/address.component';
@ -149,7 +148,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
LiquidMasterPageComponent, LiquidMasterPageComponent,
StartComponent, StartComponent,
TransactionComponent, TransactionComponent,
BlockComponent,
BlockOverviewGraphComponent, BlockOverviewGraphComponent,
BlockOverviewTooltipComponent, BlockOverviewTooltipComponent,
TransactionsListComponent, TransactionsListComponent,
@ -276,7 +274,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
AmountComponent, AmountComponent,
StartComponent, StartComponent,
TransactionComponent, TransactionComponent,
BlockComponent,
BlockOverviewGraphComponent, BlockOverviewGraphComponent,
BlockOverviewTooltipComponent, BlockOverviewTooltipComponent,
TransactionsListComponent, TransactionsListComponent,