Skip to content

Commit

Permalink
fix: correct example handling wrong urls
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Apr 19, 2024
1 parent b4d46de commit 9be04b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions components/hero/Examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ const EXAMPLES: Example[] = [
geText: "GE IV - Arts and Humanities",
institution: "UCI",
ge: "IV",
link: "/search?uni=UCI&ge=GE%20IV",
link: "/search?uni=University%20of%20California%2C%20Irvine&ge=GE%20IV",
},
{
name: "UCLA",
geText: "Life Sciences",
institution: "UCLA",
ge: "Scientific Inquiry: Life Sciences",
link: "search?uni=UCLA&ge=Scientific%20Inquiry%3A%20Life%20Sciences",
link: "search?uni=University%20of%20California%2C%20Los%20Angeles&ge=Scientific%20Inquiry%3A%20Life%20Sciences",
},
{
name: "UC Santa Barbara",
geText: "GE E - Culture and Thought",
institution: "UCSB",
ge: "E",
link: "/search?uni=UCSB&ge=GE%20E",
link: "/search?uni=University%20of%20California%2C%20Santa%20Barbara&ge=GE%20E",
},
];

Expand Down
2 changes: 1 addition & 1 deletion components/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const Search = () => {
category: analyticsEnum.search.title,
action: analyticsEnum.search.actions.SEARCH,
label: university,
value: UNIVERSITY_GE[university].findIndex((item) => {
value: UNIVERSITY_GE[university]?.findIndex((item) => {
return item.includes(ge);
}),
});
Expand Down
4 changes: 2 additions & 2 deletions components/search/SearchSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

export interface DropdownComponentProps {
value: string;
data: string[];
data?: string[];
onChange: (university: string) => void;
placeholder?: string;
}
Expand All @@ -25,7 +25,7 @@ export const SearchSelect = (props: DropdownComponentProps) => {
<SelectValue placeholder={placeholder} />
</SelectTrigger>
<SelectContent>
{data.map((item) => {
{data?.map((item) => {
let option = item;

if (option.includes("University of California")) {
Expand Down

0 comments on commit 9be04b1

Please sign in to comment.