From 51f66aa6cd725e6c6ce82a70728b58cc6ce47ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Sun, 26 Jun 2022 22:47:56 -0300 Subject: [PATCH] Use new util function to create array --- src/components/AssignmentCard.js | 1 + src/screens/Home/View.js | 36 ++++++++++++++------------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/components/AssignmentCard.js b/src/components/AssignmentCard.js index 7ab4609..daad853 100644 --- a/src/components/AssignmentCard.js +++ b/src/components/AssignmentCard.js @@ -110,6 +110,7 @@ function AssignmentCard({ title, classrooms, dueDate, scores, layoutType }) { .filter((_, i) => i > 0) .map(c => (
{classrooms === null ? ( - Array(6) - .fill() - .map((_, index) => ( - - )) + createArrayFrom1ToN(6).map(i => ( + + )) ) : classrooms.length !== 0 ? ( classrooms.map(classroom => ( {assignments === null ? ( - Array(6) - .fill() - .map((_, index) => ( - - )) + createArrayFrom1ToN(6).map(i => ( + + )) ) : assignments.length !== 0 ? ( assignments.map(assignment => (