Skip to content

Commit

Permalink
Merge pull request #44 from ucsb-cs156-s24/easierClassSearch
Browse files Browse the repository at this point in the history
en - changed course number input field to accept department names bef…
  • Loading branch information
pconrad authored May 29, 2024
2 parents 087d0ed + 94f7fe2 commit 234b85f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ const CourseOverTimeSearchForm = ({ fetchJSON }) => {
};

const handleCourseNumberOnChange = (event) => {
const rawCourse = event.target.value;
const rawInput = event.target.value;
const rawCourse = rawInput.replace(/^[a-zA-Z]+/, "");
if (rawCourse.match(/\d+/g) != null) {
const number = rawCourse.match(/\d+/g)[0];
setCourseNumber(number);
Expand Down

0 comments on commit 234b85f

Please sign in to comment.