From b3818276e38be07b2d03637bf7806b645c1f4483 Mon Sep 17 00:00:00 2001 From: Wille Marcel Date: Tue, 15 Jun 2021 12:13:13 -0300 Subject: [PATCH] Use forEach instead of map in an array that doesn't return a result --- frontend/src/hooks/UseContributorStats.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/UseContributorStats.js b/frontend/src/hooks/UseContributorStats.js index 8de8337df0..fd984ad6f1 100644 --- a/frontend/src/hooks/UseContributorStats.js +++ b/frontend/src/hooks/UseContributorStats.js @@ -23,12 +23,13 @@ export function useContributorStats(contributions) { intermediateUsers: contributions.filter((i) => i.mappingLevel === 'INTERMEDIATE').length, advancedUsers: contributions.filter((i) => i.mappingLevel === 'ADVANCED').length, }; - [ + const monthRanges = [ [0, 1], [1, 3], [3, 6], [6, 12], - ].map( + ]; + monthRanges.forEach( (months) => (data[`lessThan${months[1]}MonthExp`] = contributions.filter( (i) =>