diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index a7d4330..2e4f6bc 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -1,6 +1,6 @@ -// import LazyLoad from "react-lazy-load"; import { format } from "date-fns"; import { ExternalLinkIcon } from "lucide-react"; +import LazyLoad from "react-lazy-load"; import { CourseObject } from "./Search"; import Tags from "./Tags"; @@ -27,130 +27,134 @@ const SearchResults = (props: SearchResultsProps) => { const endTime = formatTime(result.endDate); return ( - // -
-
-
- {result.sendingInstitution} -
-
- {result.courseCode}{" "} - {result.courseName} -
-
- {result.niceToHaves.length > 0 && ( -
-
- {result.niceToHaves.map((tag) => ( - - ))} +
+
+
+ {result.sendingInstitution} +
+
+ {result.courseCode}{" "} + {result.courseName}
- )} -
-
-
-
-
- Units -
-
- {`${result.units} Units`} + {result.niceToHaves.length > 0 && ( +
+
+ {result.niceToHaves.map( + (tag) => ( + + ) + )}
-
-
- Term + )} +
+
+
+
+
+ Units +
+
+ {`${result.units} Units`} +
-
- {startTime + " - " + endTime} -
-
-
-
- GEs +
+
+ Term +
+
+ {startTime + + " - " + + endTime} +
-
- {result.fulfillsGEs - .map((obj) => { - const category = - obj.category; +
+
+ GEs +
+
+ {result.fulfillsGEs + .map((obj) => { + const category = + obj.category; - return category.includes( - ":" - ) - ? category.split( - ": " - )[1] - : category; - }) - .join(", ")} + return category.includes( + ":" + ) + ? category.split( + ": " + )[1] + : category; + }) + .join(", ")} +
-
-
-
- Articulates To -
-
- {result.articulatesTo.join( - ", " - )} +
+
+ Articulates To +
+
+ {result.articulatesTo.join( + ", " + )} +
-
-
-
-
- Tuition:{" "} - - {`$${result.tuition.toFixed(2)}`} - -
-
- - +
+
+
+ Tuition:{" "} + + {`$${result.tuition.toFixed(2)}`} + +
+
-
- // + ); }) ) : (