Use new util function to create array

This commit is contained in:
Leonardo Murça 2022-06-26 22:47:56 -03:00
parent 4a411c7779
commit 51f66aa6cd
2 changed files with 17 additions and 20 deletions

View file

@ -110,6 +110,7 @@ function AssignmentCard({ title, classrooms, dueDate, scores, layoutType }) {
.filter((_, i) => i > 0) .filter((_, i) => i > 0)
.map(c => ( .map(c => (
<div <div
key={c.id}
style={{ style={{
position: 'absolute', position: 'absolute',
width: '100%', width: '100%',

View file

@ -95,11 +95,9 @@ function View({ layoutType, classrooms, assignments }) {
gap="30px" gap="30px"
> >
{classrooms === null ? ( {classrooms === null ? (
Array(6) createArrayFrom1ToN(6).map(i => (
.fill()
.map((_, index) => (
<Skeleton <Skeleton
key={index} key={i}
variant="rectangular" variant="rectangular"
width="100%" width="100%"
height={245} height={245}
@ -131,11 +129,9 @@ function View({ layoutType, classrooms, assignments }) {
gap="30px" gap="30px"
> >
{assignments === null ? ( {assignments === null ? (
Array(6) createArrayFrom1ToN(6).map(i => (
.fill()
.map((_, index) => (
<Skeleton <Skeleton
key={index} key={i}
variant="rectangular" variant="rectangular"
width="100%" width="100%"
height={245} height={245}