Use new util function to create array
This commit is contained in:
parent
4a411c7779
commit
51f66aa6cd
2 changed files with 17 additions and 20 deletions
|
@ -110,6 +110,7 @@ function AssignmentCard({ title, classrooms, dueDate, scores, layoutType }) {
|
|||
.filter((_, i) => i > 0)
|
||||
.map(c => (
|
||||
<div
|
||||
key={c.id}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
width: '100%',
|
||||
|
|
|
@ -95,11 +95,9 @@ function View({ layoutType, classrooms, assignments }) {
|
|||
gap="30px"
|
||||
>
|
||||
{classrooms === null ? (
|
||||
Array(6)
|
||||
.fill()
|
||||
.map((_, index) => (
|
||||
createArrayFrom1ToN(6).map(i => (
|
||||
<Skeleton
|
||||
key={index}
|
||||
key={i}
|
||||
variant="rectangular"
|
||||
width="100%"
|
||||
height={245}
|
||||
|
@ -131,11 +129,9 @@ function View({ layoutType, classrooms, assignments }) {
|
|||
gap="30px"
|
||||
>
|
||||
{assignments === null ? (
|
||||
Array(6)
|
||||
.fill()
|
||||
.map((_, index) => (
|
||||
createArrayFrom1ToN(6).map(i => (
|
||||
<Skeleton
|
||||
key={index}
|
||||
key={i}
|
||||
variant="rectangular"
|
||||
width="100%"
|
||||
height={245}
|
||||
|
|
Loading…
Reference in a new issue