diff --git a/frontend/src/modules/Metrics/Components/Metrics.tsx b/frontend/src/modules/Metrics/Components/Metrics.tsx index f12f7dad..dccedd87 100644 --- a/frontend/src/modules/Metrics/Components/Metrics.tsx +++ b/frontend/src/modules/Metrics/Components/Metrics.tsx @@ -12,9 +12,11 @@ import { DASHBOARD_PATH } from '@core/Constants' import { Link } from 'react-router-dom' import { GroupMembership } from '@core' import survey from '@core/Questions/Questions.json' +import { useSettingsValue } from '@context/SettingsContext' export const Metrics = () => { - const { courses } = useCourseValue() + const { currRoster } = useSettingsValue() + const { courses, semesters } = useCourseValue() const { students } = useStudentValue() //checks if date is within the week (beginning of the day Sunday to end of day Saturday) @@ -46,7 +48,7 @@ export const Metrics = () => { ) } - const [selectedRoster, setSelectedRoster] = useState('SP23') + const [selectedRoster, setSelectedRoster] = useState(currRoster) const studentsInSemester = new Map< string, { semester: string; groups: GroupMembership[]; college: string } @@ -292,12 +294,11 @@ export const Metrics = () => { alignSelf: 'flex-end', }} > - Summer 2022 - Fall 2022 - Winter 2023 - Spring 2023 - Summer 2023 - Winter 2024 + {semesters.map((sem) => ( + + {sem} + + ))}