Skip to content

Commit

Permalink
Properly display the most recent semester for Course Overalls
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiramTadepalli committed Feb 4, 2025
1 parent 0cca0ed commit 42e8f08
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/search/SearchResultsTable/searchResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ function Row({
most_recent_semester_from_grades: string,
): string {
let { season, yyyy } = getCurrentSemester();
console.log('hi', sections);
if (
typeof sections !== 'undefined' &&
sections.state === 'done' &&
typeof course.profFirst === 'undefined' &&
typeof course.profLast === 'undefined'
) {
return sections.data.sort((a, b) =>
compareSemesters(b.academic_session.name, a.academic_session.name),
)[0].academic_session.name;
}
if (
typeof sections !== 'undefined' &&
typeof professor !== 'undefined' &&
Expand Down

0 comments on commit 42e8f08

Please sign in to comment.