Skip to content

Commit

Permalink
ENH:changes filter page
Browse files Browse the repository at this point in the history
  • Loading branch information
Charvit123 committed Jul 6, 2023
1 parent 8e1a74d commit 0ed1726
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/components/courses/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const Filter = ({
});
if (response && response.ok) {
const coursesResponse = await response.json();
console.log(coursesResponse);
setPopularCourses(coursesResponse);
}
} catch (error) {
Expand All @@ -65,11 +64,13 @@ const Filter = ({
try {
if (selectTagId.length > 0) {
const filterByTagUrl =
"http://localhost:5000/course/popular/filterByTags?" +
"https://backend-mu-plum.vercel.app/course/popular/filterByTags?" +
selectTagId.map((tagId) => `tags=${tagId}`).join("&&");
fetchPopularCourses(filterByTagUrl);
} else {
fetchPopularCourses("http://localhost:5000/course/popular/");
fetchPopularCourses(
"https://backend-mu-plum.vercel.app/course/popular/"
);
}
} catch (error) {
toast.error("An error occurred" + error, {
Expand Down

0 comments on commit 0ed1726

Please sign in to comment.