Skip to content

Commit

Permalink
Reverted bad changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaydenkim committed Jan 15, 2025
1 parent b6d853a commit 9046d31
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/src/modules/Results/Components/ResultsDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ export const ResultsDisplay = ({

useEffect(() => {
setCourseList(courses);
setCardCourse(courses[0] || {});
setFilteredItems(courses);
setFilterMap(getInitialFilterMap());
filterClasses();
}, [courses, loading, type, userInput, courseList]);

useEffect(() => {
setFilterMap(getInitialFilterMap());
filterClasses();
}, [userInput]);
}, [filterMap]);

useEffect(() => {
sort(filteredItems);
}, [selected]);

/**
* Handles selecting different sort filters
Expand Down Expand Up @@ -171,6 +177,7 @@ export const ResultsDisplay = ({
);
}

setFilteredItems(filtered);
sort(filtered);
};

Expand Down

0 comments on commit 9046d31

Please sign in to comment.