mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Split Block component into separate module
This commit is contained in:
parent
27077dcd6c
commit
b5a8687b6a
3 changed files with 53 additions and 54 deletions
|
@ -3,7 +3,6 @@ import { Routes, RouterModule } from '@angular/router';
|
|||
import { AppPreloadingStrategy } from './app.preloading-strategy'
|
||||
import { StartComponent } from './components/start/start.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 { MempoolBlockViewComponent } from './components/mempool-block-view/mempool-block-view.component';
|
||||
import { ClockComponent } from './components/clock/clock.component';
|
||||
|
@ -100,16 +99,8 @@ let routes: Routes = [
|
|||
{
|
||||
path: 'block',
|
||||
component: StartComponent,
|
||||
data: { networkSpecific: true },
|
||||
children: [
|
||||
{
|
||||
path: ':id',
|
||||
component: BlockComponent,
|
||||
data: {
|
||||
ogImage: true
|
||||
}
|
||||
},
|
||||
],
|
||||
data: { preload: true, networkSpecific: true },
|
||||
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
||||
},
|
||||
{
|
||||
path: 'docs',
|
||||
|
@ -209,17 +200,9 @@ let routes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'block',
|
||||
data: { networkSpecific: true },
|
||||
component: StartComponent,
|
||||
children: [
|
||||
{
|
||||
path: ':id',
|
||||
component: BlockComponent,
|
||||
data: {
|
||||
ogImage: true
|
||||
}
|
||||
},
|
||||
],
|
||||
data: { preload: true, networkSpecific: true },
|
||||
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
||||
},
|
||||
{
|
||||
path: 'docs',
|
||||
|
@ -319,17 +302,9 @@ let routes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'block',
|
||||
data: { networkSpecific: true },
|
||||
component: StartComponent,
|
||||
children: [
|
||||
{
|
||||
path: ':id',
|
||||
component: BlockComponent,
|
||||
data: {
|
||||
ogImage: true
|
||||
}
|
||||
},
|
||||
],
|
||||
data: { preload: true, networkSpecific: true },
|
||||
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
||||
},
|
||||
{
|
||||
path: 'docs',
|
||||
|
@ -466,17 +441,9 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
|
|||
},
|
||||
{
|
||||
path: 'block',
|
||||
data: { networkSpecific: true },
|
||||
component: StartComponent,
|
||||
children: [
|
||||
{
|
||||
path: ':id',
|
||||
component: BlockComponent,
|
||||
data: {
|
||||
ogImage: true
|
||||
}
|
||||
},
|
||||
],
|
||||
data: { preload: true, networkSpecific: true },
|
||||
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
||||
},
|
||||
{
|
||||
path: 'assets',
|
||||
|
@ -584,17 +551,9 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
|
|||
},
|
||||
{
|
||||
path: 'block',
|
||||
data: { networkSpecific: true },
|
||||
component: StartComponent,
|
||||
children: [
|
||||
{
|
||||
path: ':id',
|
||||
component: BlockComponent,
|
||||
data: {
|
||||
ogImage: true
|
||||
}
|
||||
},
|
||||
],
|
||||
data: { preload: true, networkSpecific: true },
|
||||
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
||||
},
|
||||
{
|
||||
path: 'assets',
|
||||
|
|
43
frontend/src/app/components/block/block.module.ts
Normal file
43
frontend/src/app/components/block/block.module.ts
Normal 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 { }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -47,7 +47,6 @@ import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
|
|||
import { StartComponent } from '../components/start/start.component';
|
||||
import { TransactionComponent } from '../components/transaction/transaction.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 { BlockOverviewTooltipComponent } from '../components/block-overview-tooltip/block-overview-tooltip.component';
|
||||
import { AddressComponent } from '../components/address/address.component';
|
||||
|
@ -149,7 +148,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
|
|||
LiquidMasterPageComponent,
|
||||
StartComponent,
|
||||
TransactionComponent,
|
||||
BlockComponent,
|
||||
BlockOverviewGraphComponent,
|
||||
BlockOverviewTooltipComponent,
|
||||
TransactionsListComponent,
|
||||
|
@ -276,7 +274,6 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
|
|||
AmountComponent,
|
||||
StartComponent,
|
||||
TransactionComponent,
|
||||
BlockComponent,
|
||||
BlockOverviewGraphComponent,
|
||||
BlockOverviewTooltipComponent,
|
||||
TransactionsListComponent,
|
||||
|
|
Loading…
Add table
Reference in a new issue