From 5952b659323babe095c009820b5c43c2d0b9c609 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Wed, 29 Sep 2021 23:08:19 -0400 Subject: [PATCH] explorer: Add epoch details page (#20335) --- explorer/src/App.tsx | 6 + explorer/src/components/SearchBar.tsx | 25 ++- .../src/components/account/RewardsCard.tsx | 5 +- .../account/StakeAccountSection.tsx | 30 +++- .../components/account/StakeHistoryCard.tsx | 5 +- .../account/SysvarAccountSection.tsx | 7 +- .../src/components/block/BlockHistoryCard.tsx | 2 - .../components/block/BlockOverviewCard.tsx | 19 ++- explorer/src/components/common/Copyable.tsx | 4 +- explorer/src/components/common/Epoch.tsx | 24 +++ explorer/src/components/common/Slot.tsx | 22 +-- .../stake/InitializeDetailsCard.tsx | 5 +- explorer/src/index.tsx | 13 +- explorer/src/pages/ClusterStatsPage.tsx | 6 +- explorer/src/pages/EpochDetailsPage.tsx | 158 ++++++++++++++++++ explorer/src/providers/cluster.tsx | 15 +- explorer/src/providers/epoch.tsx | 149 +++++++++++++++++ 17 files changed, 454 insertions(+), 41 deletions(-) create mode 100644 explorer/src/components/common/Epoch.tsx create mode 100644 explorer/src/pages/EpochDetailsPage.tsx create mode 100644 explorer/src/providers/epoch.tsx diff --git a/explorer/src/App.tsx b/explorer/src/App.tsx index d5b1242ed..4a0d47238 100644 --- a/explorer/src/App.tsx +++ b/explorer/src/App.tsx @@ -13,6 +13,7 @@ import { ClusterStatsPage } from "pages/ClusterStatsPage"; import { SupplyPage } from "pages/SupplyPage"; import { TransactionDetailsPage } from "pages/TransactionDetailsPage"; import { BlockDetailsPage } from "pages/BlockDetailsPage"; +import { EpochDetailsPage } from "pages/EpochDetailsPage"; const ADDRESS_ALIASES = ["account", "accounts", "addresses"]; const TX_ALIASES = ["txs", "txn", "txns", "transaction", "transactions"]; @@ -52,6 +53,11 @@ function App() { )} /> + } + /> , @@ -44,7 +44,12 @@ export function SearchBar() {