Skip to content

Commit

Permalink
Made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmgperson committed Nov 19, 2023
1 parent f4fe65c commit 1b4ae20
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/components/CourseSearchList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ const CoursePage = () => {

const coursesToShow: string[] = useMemo(() => {
if (page === 1 && exactResultsCourses.length > 0) {
const filteredCourses = pageCourses.filter(
(courseID) => !exactResultsCourses.includes(courseID)
);

if(pageCourses.includes(exactResultsCourses[0])) {
const filteredCourses = pageCourses.filter(
(courseID) => !exactResultsCourses.includes(courseID)
);
return [...exactResultsCourses, ...filteredCourses];
} else {
return pageCourses;
Expand Down

0 comments on commit 1b4ae20

Please sign in to comment.