Skip to content

Commit

Permalink
FullCourseList: avoid infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
makinbacon21 committed Nov 23, 2024
1 parent def0d57 commit 7241789
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/FullCourseList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export function FullCourseList({
setIsDone(false);
}
setCourses(apiCourses);
}, [courses, cursor, take, query, term, dotw, stime, inView]);
// Prevent an infinite loop. TODO: better solution.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [query, term, dotw, stime, inView]);

useEffect(() => {
if (inView) {
Expand Down

0 comments on commit 7241789

Please sign in to comment.