diff --git a/src/components/SearchResultsTable.tsx b/src/components/SearchResultsTable.tsx index 775987e..0f8711c 100644 --- a/src/components/SearchResultsTable.tsx +++ b/src/components/SearchResultsTable.tsx @@ -63,7 +63,14 @@ function Row({ course, grades, backupGrades, rmp, setPage }: RowProps) { return ( <> - + { + if (canOpen) { + setOpen(!open); + } + }} // opens/closes the card by clicking anywhere on the row + className="cursor-pointer" + > {searchQueryLabel(convertToProfOnly(course))} @@ -76,6 +83,7 @@ function Row({ course, grades, backupGrades, rmp, setPage }: RowProps) { setOpen(!open); } }} // opens/closes the card by clicking anywhere on the row + className="cursor-pointer" > - e.stopPropagation() // prevents opening/closing the card when clicking on the compare checkbox - } - > + setPage(convertToProfOnly(course))} + onClick={(e) => { + e.stopPropagation(); // prevents opening/closing the card when clicking on the profile + setPage(convertToProfOnly(course)); + } >