Skip to content

Commit 518acdd

Browse files
feat: remove grade projections (#8)
1 parent df0f631 commit 518acdd

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

website/src/views/home.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import React, { useMemo, useContext, useEffect, useState } from 'react';
2-
import { Box, Typography, useMediaQuery } from '@mui/material';
1+
import React, { useMemo, useContext } from 'react';
2+
import { Box, useMediaQuery } from '@mui/material';
33
import useFetch from '../utils/useFetch';
44
import Loader from '../components/Loader';
55
import GradeAccordion from '../components/GradeAccordion';
66
import GradeGrid from '../components/GradeGrid';
77
import Grid from '@mui/material/Unstable_Grid2';
8-
import ProjectionTable from '../components/ProjectionTable';
8+
// import ProjectionTable from '../components/ProjectionTable';
99
import { StudentSelectionContext } from "../components/StudentSelectionWrapper";
1010

1111
function Home() {
1212

13-
const [binsData, setBinsData] = useState([]);
13+
// const [binsData, setBinsData] = useState([]);
1414

1515
const mobileView = useMediaQuery('(max-width:600px)');
1616

@@ -20,17 +20,17 @@ function Home() {
2020
return selectedStudent || localStorage.getItem('email');
2121
}, [selectedStudent]);
2222

23-
const binsInfo = useFetch('/bins');
23+
// const binsInfo = useFetch('/bins');
2424
const gradeInfo = useFetch(`students/${fetchEmail}/grades`);
25-
const projectionsInfo = useFetch(`/students/${fetchEmail}/projections`);
25+
// const projectionsInfo = useFetch(`/students/${fetchEmail}/projections`);
2626

27-
useEffect(() => {
28-
if (binsInfo.data && localStorage.getItem('token')) {
29-
setBinsData(binsInfo.data.map(({ letter, points }) => [points, letter]));
30-
}
31-
}, [binsInfo.data]);
27+
// useEffect(() => {
28+
// if (binsInfo.data && localStorage.getItem('token')) {
29+
// setBinsData(binsInfo.data.map(({ letter, points }) => [points, letter]));
30+
// }
31+
// }, [binsInfo.data]);
3232

33-
if (gradeInfo.loading || binsInfo.loading || projectionsInfo.loading) {
33+
if (gradeInfo.loading /*|| binsInfo.loading || projectionsInfo.loading */) {
3434
return (<Loader />);
3535
}
3636

@@ -59,14 +59,14 @@ function Home() {
5959
</Grid>
6060
</Box>
6161
}
62-
{localStorage.getItem('token') &&
62+
{/* {localStorage.getItem('token') &&
6363
<Box>
6464
<Typography variant='h5' component='div' sx={{ mt: 6, mb: 2, fontWeight: 500, textAlign: 'center' }}>Grade Projections</Typography>
6565
<Box sx={{ mb: 4, display: 'flex', flexBasis: 'min-content', justifyContent: 'center' }}>
6666
<ProjectionTable projections={projectionsInfo.data} gradeData={binsData} />
6767
</Box>
6868
</Box>
69-
}
69+
} */}
7070
</Box>
7171
);
7272
}

0 commit comments

Comments
 (0)