From 1b65aa07447a9538d96ca2c988a7e59304a84d3e Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Fri, 20 Oct 2023 09:39:51 +0300 Subject: [PATCH] fix: add keys to validators tabs --- .../General/RightSideBar/ValidatorsTabs/ValidatorsTabs.tsx | 4 ++-- src/pages/Dashboard/CPULoad/CPUCard.tsx | 1 + src/pages/Dashboard/MemoryCard/MemoryCard.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/General/RightSideBar/ValidatorsTabs/ValidatorsTabs.tsx b/src/components/General/RightSideBar/ValidatorsTabs/ValidatorsTabs.tsx index 372f6e4c..c3f53fe8 100644 --- a/src/components/General/RightSideBar/ValidatorsTabs/ValidatorsTabs.tsx +++ b/src/components/General/RightSideBar/ValidatorsTabs/ValidatorsTabs.tsx @@ -31,14 +31,14 @@ const ValidatorsTabs = () => { {VALIDATOR_TABS.map(tab => ( - + {tab.label} ))} {VALIDATOR_TABS.map(tab => ( - + {tab.children} ))} diff --git a/src/pages/Dashboard/CPULoad/CPUCard.tsx b/src/pages/Dashboard/CPULoad/CPUCard.tsx index 7a4d8ce9..22424db8 100644 --- a/src/pages/Dashboard/CPULoad/CPUCard.tsx +++ b/src/pages/Dashboard/CPULoad/CPUCard.tsx @@ -33,6 +33,7 @@ const CPUCard = ({ load }: CPUCardProps) => { })), }, ] + const currentLoad = chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0 diff --git a/src/pages/Dashboard/MemoryCard/MemoryCard.tsx b/src/pages/Dashboard/MemoryCard/MemoryCard.tsx index 36ad4b3a..b59cb2b4 100644 --- a/src/pages/Dashboard/MemoryCard/MemoryCard.tsx +++ b/src/pages/Dashboard/MemoryCard/MemoryCard.tsx @@ -35,6 +35,7 @@ const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => { maxValue: maxMemory, }, ] + const currentLoad = chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0