From 9309d9995a7e6ef9869070abbc13d319197b58ec Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Fri, 2 Sep 2022 13:09:27 +1000 Subject: [PATCH] feat: update get started logs --- web/src/parts/Header.tsx | 48 +++++++++++++++---- web/src/parts/PrimarySection.tsx | 29 ++--------- .../parts/checkpoints/CheckpointsTable.tsx | 24 +++++----- web/src/parts/get-started/GetStarted.tsx | 17 ++++++- .../parts/get-started/GetStartedSelection.tsx | 19 ++++---- .../parts/get-started/GetStartedSlideout.tsx | 2 +- web/src/parts/upstream/UpstreamTable.tsx | 28 +++++------ web/tailwind.config.js | 14 ------ 8 files changed, 97 insertions(+), 84 deletions(-) diff --git a/web/src/parts/Header.tsx b/web/src/parts/Header.tsx index 8e60dea..893b928 100644 --- a/web/src/parts/Header.tsx +++ b/web/src/parts/Header.tsx @@ -19,6 +19,24 @@ export default function Header() { }; return (
+
+
+
+ Network: +
+
+ {majorityNetwork} +
+
+
+
+ Operation Mode: +
+
+ {data?.data?.operating_mode ?? 'unknown'} +
+
+
diff --git a/web/src/parts/PrimarySection.tsx b/web/src/parts/PrimarySection.tsx index 6a50263..e2f937c 100644 --- a/web/src/parts/PrimarySection.tsx +++ b/web/src/parts/PrimarySection.tsx @@ -3,7 +3,6 @@ import { useEffect, useState } from 'react'; import { Tab } from '@headlessui/react'; import clsx from 'clsx'; -import useStatus from '@hooks/status'; import Checkpoints from '@parts/checkpoints/Checkpoints'; import Upstream from '@parts/upstream/Upstream'; @@ -19,7 +18,6 @@ const Sections = [ ]; export default function Section() { - const { data } = useStatus(); const [tabOrientation, setTabOrientation] = useState('horizontal'); useEffect(() => { @@ -40,30 +38,9 @@ export default function Section() { return (
- {data?.data?.operating_mode === 'light' && ( -
-
-
-
- Light -
-
-
-
- )} - + {({ selectedIndex }) => ( <>
@@ -93,7 +70,7 @@ export default function Section() { ))}
- + {Sections.map((section) => (
diff --git a/web/src/parts/checkpoints/CheckpointsTable.tsx b/web/src/parts/checkpoints/CheckpointsTable.tsx index 9b09bae..4b2bf90 100644 --- a/web/src/parts/checkpoints/CheckpointsTable.tsx +++ b/web/src/parts/checkpoints/CheckpointsTable.tsx @@ -68,35 +68,35 @@ export default function CheckpointsTable(props: { Epoch Slot Time State Root Block Root - + View @@ -104,7 +104,7 @@ export default function CheckpointsTable(props: { {filteredSlots.map((slot) => ( - + {slot.epoch} {props.latestEpoch && slot.epoch && slot.epoch === props.latestEpoch && ( )} - + {slot.slot} {props.latestEpoch && slot.epoch && slot.epoch === props.latestEpoch && ( )} - + {slot.time?.start_time && ( <> )} - + {slot.state_root ? ( <> @@ -160,7 +160,7 @@ export default function CheckpointsTable(props: { '' )} - + {slot.block_root ? ( <> @@ -181,7 +181,7 @@ export default function CheckpointsTable(props: { '' )} - + {slot.block_root && (