From b27b8cc5b1a7642788867000d3ab26f9154bdfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Wed, 3 Aug 2022 20:01:21 -0300 Subject: [PATCH] Add skeleton loading for classroom --- src/screens/Classroom/View.js | 44 +++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/src/screens/Classroom/View.js b/src/screens/Classroom/View.js index c503ff3..2fd6111 100644 --- a/src/screens/Classroom/View.js +++ b/src/screens/Classroom/View.js @@ -6,6 +6,7 @@ import { Grid, Link, Paper, + Skeleton, Stack, Tab, Tabs, @@ -15,6 +16,7 @@ import { import { TAB_OPTIONS } from './tabOptions'; import styles from './styles'; import AnnouncementCard from '../../components/AnnouncementCard'; +import { createArrayFrom1ToN } from '../../utils/createArrayFrom1ToN'; function View({ layoutType, @@ -28,7 +30,7 @@ function View({ return ( {classroom === null ? ( -

Loading...

+ ) : ( )} {announcementsTabData === null ? ( -

Loading...

+ + + + + + {createArrayFrom1ToN(4).map(i => ( + + ))} + + ) : ( @@ -119,7 +136,7 @@ function View({ return ( {classroom === null ? ( -

Loading...

+ ) : ( )} {announcementsTabData === null ? ( -

Loading...

+ + + + {createArrayFrom1ToN(4).map(i => ( + + ))} + ) : (