diff --git a/components/search/Search.tsx b/components/search/Search.tsx index 37cedd9..3a72136 100644 --- a/components/search/Search.tsx +++ b/components/search/Search.tsx @@ -196,7 +196,7 @@ const Search = () => { const fetchData = async () => { try { const universityParam = university; - const geParam = !ge.includes("GE") ? ge : ge.split(" ")[1]; + const geParam = ge.includes("GE") ? ge.split(" ")[1] : ge; const courses = await queryDatabase(universityParam, geParam); setCourses(courses); diff --git a/components/search/SearchResults.tsx b/components/search/SearchResults.tsx index 21b9682..99068e4 100644 --- a/components/search/SearchResults.tsx +++ b/components/search/SearchResults.tsx @@ -88,7 +88,18 @@ const SearchResults = (props: SearchResultsProps) => {
{result.fulfillsGEs - .map((obj) => obj.category) + .map((obj) => { + const category = + obj.category; + + return category.includes( + ":", + ) + ? category.split( + ": ", + )[1] + : category; + }) .join(", ")}
diff --git a/components/search/SearchSelect.tsx b/components/search/SearchSelect.tsx index c7df1de..e904cfa 100644 --- a/components/search/SearchSelect.tsx +++ b/components/search/SearchSelect.tsx @@ -21,17 +21,31 @@ export const SearchSelect = (props: DropdownComponentProps) => { return (
diff --git a/lib/constants.tsx b/lib/constants.tsx index ad51f33..47f7038 100644 --- a/lib/constants.tsx +++ b/lib/constants.tsx @@ -21,4 +21,13 @@ export const UNIVERSITY_GE: Record = { "GE F", "GE G", ], + "University of California, Los Angeles": [ + "Arts and Humanities: Literary and Cultural Analysis", + "Arts and Humanities: Philosophical and Linguistic Analysis", + "Arts and Humanities: Visual and Performance Arts Analysis and Practice", + "Scientific Inquiry: Life Sciences", + "Scientific Inquiry: Physical Sciences", + "Society and Culture: Historical Analysis", + "Society and Culture: Social Analysis", + ], };