diff --git a/src/screens/Classroom/AssignmentsTab/index.js b/src/screens/Classroom/AssignmentsTab/index.js index 96e3dec..bafd34a 100644 --- a/src/screens/Classroom/AssignmentsTab/index.js +++ b/src/screens/Classroom/AssignmentsTab/index.js @@ -1,14 +1,84 @@ -import { Container, Link, Stack, Typography } from '@mui/material'; +import { Container, Link, Skeleton, Stack, Typography } from '@mui/material'; import dayjs from 'dayjs'; import { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'; function AssignmentsTab({ assignmentsTabData, layoutType }) { - console.log(assignmentsTabData); const layoutResolver = (state, assignments, layoutType) => { if (layoutType === 'desktop') { switch (state) { case 'loading': - return

Loading...

; + return ( + + + + + + + + + + + + + + + + + + + + + + + + + ); case 'idle': return ( diff --git a/src/screens/Classroom/index.js b/src/screens/Classroom/index.js index 00c2491..aa2663d 100644 --- a/src/screens/Classroom/index.js +++ b/src/screens/Classroom/index.js @@ -15,12 +15,11 @@ function Classroom() { fetchAssignmentsByClassId, } = useUser(); const [classroom, setClassroom] = useState(null); + const [tabData, setTabData] = useState(null); const [selectedTabOption, setSelectedTabOption] = useState( TAB_OPTIONS.announcements.value ); - const [tabData, setTabData] = useState(null); - const fetchAndPopulateAnnouncementsTabData = useCallback(async () => { setTabData({ tab: 'announcements', state: 'loading' }); const announcements = await fetchClassroomAnnouncements(params.id);