From 80509a03ac9eb0aa85655c6047c497590aac15e2 Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Thu, 12 Apr 2018 22:53:28 -0500 Subject: [PATCH] web-ui: Add a the richest addresses to the nav bar --- web-ui/src/app/app-routing.module.ts | 2 ++ web-ui/src/app/components/navbar/navbar.component.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web-ui/src/app/app-routing.module.ts b/web-ui/src/app/app-routing.module.ts index 559d8ca..748e715 100644 --- a/web-ui/src/app/app-routing.module.ts +++ b/web-ui/src/app/app-routing.module.ts @@ -5,12 +5,14 @@ import { HomeComponent } from './components/home/home.component'; import { TransactionDetailsComponent } from './components/transaction-details/transaction-details.component'; import { AddressDetailsComponent } from './components/address-details/address-details.component'; import { BlockDetailsComponent } from './components/block-details/block-details.component'; +import { RichestAddressesComponent } from './components/richest-addresses/richest-addresses.component'; const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'addresses/:address', component: AddressDetailsComponent }, { path: 'blocks/:blockhash', component: BlockDetailsComponent }, { path: 'transactions/:txid', component: TransactionDetailsComponent }, + { path: 'richest-addresses', component: RichestAddressesComponent }, { path: '**', redirectTo: '' } ]; diff --git a/web-ui/src/app/components/navbar/navbar.component.ts b/web-ui/src/app/components/navbar/navbar.component.ts index ad7b58c..a731ee9 100644 --- a/web-ui/src/app/components/navbar/navbar.component.ts +++ b/web-ui/src/app/components/navbar/navbar.component.ts @@ -1,6 +1,11 @@ import { Component, OnInit } from '@angular/core'; import { Location } from '@angular/common'; +class Tab { + label: string; + path: string; +} + @Component({ selector: 'app-navbar', templateUrl: './navbar.component.html', @@ -8,7 +13,9 @@ import { Location } from '@angular/common'; }) export class NavbarComponent implements OnInit { - public tabs = []; + public tabs: Tab[] = [ + { label: 'label.richestAddresses', path: 'richest-addresses' } + ]; constructor(private location: Location) { }