From 5cdb4d247b0e5d5f71c4a02412b2f5cbab7dde73 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Tue, 19 Sep 2023 11:35:01 +0300 Subject: [PATCH] Update NetworkCard with use of DashboardCardWrapper --- src/pages/Dashboard/Dashboard.tsx | 4 ++-- src/pages/Dashboard/MemoryCard/MemoryCard.tsx | 5 +---- .../Dashboard/NetworkCard/NetworkCard.tsx | 22 +++++++++---------- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/Dashboard/Dashboard.tsx index 8ca81af8..3ad43bb3 100644 --- a/src/pages/Dashboard/Dashboard.tsx +++ b/src/pages/Dashboard/Dashboard.tsx @@ -47,8 +47,8 @@ const Dashboard = () => { diff --git a/src/pages/Dashboard/MemoryCard/MemoryCard.tsx b/src/pages/Dashboard/MemoryCard/MemoryCard.tsx index bb1db19d..7bb29a51 100644 --- a/src/pages/Dashboard/MemoryCard/MemoryCard.tsx +++ b/src/pages/Dashboard/MemoryCard/MemoryCard.tsx @@ -41,16 +41,13 @@ const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => { const message = currentLoad < maxMemory ? 'Good' : 'Poor' return ( - - - + { })), }, ] - + const currentLoad = chartData[0].data.length > 0 ? chartData[0].data[chartData[0].data.length - 1].y : 0 const message = currentLoad > 60 ? 'Good' : 'Poor' return ( - + + + - + }}> { position: 'relative', }} > -
+ -
+ @@ -90,7 +90,7 @@ const NetworkCard = ({ uploadRate, downloadRate }: NetworkCardProps) => {
- + : } > @@ -103,7 +103,7 @@ const NetworkCard = ({ uploadRate, downloadRate }: NetworkCardProps) => { )}
-
+
) }