From f41aa43738bf008b5f64e6cdab746e47f652e01e Mon Sep 17 00:00:00 2001 From: Vanshul Agarwal Date: Thu, 25 Jul 2024 01:28:13 +0530 Subject: [PATCH] leaderboard reduce array error --- client/src/Pages/Dashboard/Dashboard.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/Pages/Dashboard/Dashboard.jsx b/client/src/Pages/Dashboard/Dashboard.jsx index 4b7b70d..4fbadce 100644 --- a/client/src/Pages/Dashboard/Dashboard.jsx +++ b/client/src/Pages/Dashboard/Dashboard.jsx @@ -50,7 +50,7 @@ const Dashboard = () => { }, []); const [activePlatform, setActivePlatform] = useState('cf'); - const [lineGraphData, setLineGraphData] = useState([]); + const [lineGraphData, setLineGraphData] = useState(null); const [pieChartData, setPieChartData] = useState({}); const [details, setDetails] = useState({}); @@ -226,7 +226,7 @@ const Dashboard = () => { : null}
- {lineGraphData &&
+ {lineGraphData && lineGraphData.length>0 &&
} {pieChartData && activePlatform === 'cf' &&