Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: grade distributions for departments with a space #438

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/src/component/GradeDist/GradeDist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
if (props.course) {
url = `/api/courses/api/grades`;
params = {
department: props.course.department.replace(/ /g, ''),
department: props.course.department,
number: props.course.courseNumber,
};
} else if (props.professor) {
Expand All @@ -67,7 +67,7 @@
useEffect(() => {
setGradeDistData(null!);
fetchGradeDistData();
}, [props.course?.id, props.professor?.ucinetid]);

Check warning on line 70 in site/src/component/GradeDist/GradeDist.tsx

View workflow job for this annotation

GitHub Actions / Lint and check formatting

React Hook useEffect has a missing dependency: 'fetchGradeDistData'. Either include it or remove the dependency array

// update list of professors/courses when new course/professor is detected
useEffect(() => {
Expand All @@ -78,14 +78,14 @@
createCourseEntries();
}
}
}, [gradeDistData]);

Check warning on line 81 in site/src/component/GradeDist/GradeDist.tsx

View workflow job for this annotation

GitHub Actions / Lint and check formatting

React Hook useEffect has missing dependencies: 'createCourseEntries', 'createProfEntries', 'props.course', and 'props.professor'. Either include them or remove the dependency array

// update list of quarters when new professor/course is chosen
useEffect(() => {
if ((currentProf || currentCourse) && gradeDistData.length !== 0) {
createQuarterEntries();
}
}, [currentProf, currentCourse]);

Check warning on line 88 in site/src/component/GradeDist/GradeDist.tsx

View workflow job for this annotation

GitHub Actions / Lint and check formatting

React Hook useEffect has missing dependencies: 'createQuarterEntries' and 'gradeDistData.length'. Either include them or remove the dependency array

/*
* Create an array of objects to feed into the quarter dropdown menu.
Expand Down
Loading