Skip to content

Commit

Permalink
leaderboard reduce array error
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshulagarwal committed Jul 24, 2024
1 parent fdd03cc commit f41aa43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/Pages/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({});

Expand Down Expand Up @@ -226,7 +226,7 @@ const Dashboard = () => {
: null}
</div>
<div className="graphs">
{lineGraphData && <div className="lineGraph">
{lineGraphData && lineGraphData.length>0 && <div className="lineGraph">
<LineGraph data={lineGraphData} platform={activePlatform} />
</div>}
{pieChartData && activePlatform === 'cf' && <div className="piechart">
Expand Down

0 comments on commit f41aa43

Please sign in to comment.