From e4a07b52c42de6f0e2ce2a0a0aa54d52ea65e982 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Tue, 23 Apr 2024 23:03:24 -0700 Subject: [PATCH] fix: correct filter --- lib/utils/filter.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/utils/filter.ts b/lib/utils/filter.ts index 736e550..942e7be 100644 --- a/lib/utils/filter.ts +++ b/lib/utils/filter.ts @@ -39,30 +39,18 @@ export function filterData( (filterValues.format[0] && filterValues.format[1]) || (result.async && filterValues.format[0]) || (!result.async && filterValues.format[1]); - - const instantEnrollment = filterValues.enrollment[0] - ? result.instantEnrollment - : true; const hasOpenSeats = filterValues.available[0] ? result.hasOpenSeats : true; const teachingInstitution = result.sendingInstitution == filterValues.institution || filterValues.institution == "Any Institution"; - const withinUnits = - result.units >= filterValues.min && - result.units <= filterValues.max; const withinTime = startsAfter(filterValues.start, result) && endsBefore(filterValues.end, result); return ( - onlineFormat && - instantEnrollment && - hasOpenSeats && - teachingInstitution && - withinUnits && - withinTime + onlineFormat && hasOpenSeats && teachingInstitution && withinTime ); });