From 00fd0e3b14dc5dda21451b38eee2f56a6f9994a8 Mon Sep 17 00:00:00 2001 From: Jaco Date: Thu, 29 Apr 2021 10:45:03 +0300 Subject: [PATCH] Allow forks on explorer (no Babe), adjust EventsContext (#5161) --- packages/page-explorer/src/index.tsx | 5 -- packages/react-query/src/Events.tsx | 127 ++++++++++++++------------- 2 files changed, 67 insertions(+), 65 deletions(-) diff --git a/packages/page-explorer/src/index.tsx b/packages/page-explorer/src/index.tsx index 283ad205f1..a7acd6ef5d 100644 --- a/packages/page-explorer/src/index.tsx +++ b/packages/page-explorer/src/index.tsx @@ -7,7 +7,6 @@ import React, { useContext, useRef } from 'react'; import { Route, Switch } from 'react-router'; import Tabs from '@polkadot/react-components/Tabs'; -import { useApi } from '@polkadot/react-hooks'; import { BlockAuthorsContext, EventsContext } from '@polkadot/react-query'; import BlockInfo from './BlockInfo'; @@ -22,11 +21,8 @@ interface Props { newEvents?: KeyedEvent[]; } -const HIDDESN_NOBABE = ['forks']; - function ExplorerApp ({ basePath, className }: Props): React.ReactElement { const { t } = useTranslation(); - const { api } = useApi(); const { lastHeaders } = useContext(BlockAuthorsContext); const events = useContext(EventsContext); @@ -55,7 +51,6 @@ function ExplorerApp ({ basePath, className }: Props): React.ReactElement