From 08717528c50661ab0b3f84b11c138640e6cb187e Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Tue, 6 Nov 2018 16:18:52 +0530 Subject: [PATCH] Fix incorrect campaign counts on dashboard --- frontend/my/src/Dashboard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/my/src/Dashboard.js b/frontend/my/src/Dashboard.js index 7a3da08..f899e64 100644 --- a/frontend/my/src/Dashboard.js +++ b/frontend/my/src/Dashboard.js @@ -104,10 +104,15 @@ class Dashboard extends React.PureComponent { - { this.campaignTypes.map((key, count) => + { this.campaignTypes.map((key) =>

{ key }

-

{ count }

+ +

+ { this.state.stats.campaigns.hasOwnProperty(key) ? + this.state.stats.campaigns[key] : 0 } +

+
)}