Skip to content

Commit

Permalink
Sort professor names in review cards
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaydenkim committed Jan 14, 2025
1 parent 6b3fe08 commit 09d7767
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/modules/Course/Components/PreviewReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function PreviewReviewCard({
// list of professors (name1, name2, ..)
let professornames = '';
if (_review.professors && _review.professors.length > 0)
professornames += _review.professors.join(', ');
professornames += _review.professors.sort().join(', ');
else professornames += 'Not Listed';

if (isProfile) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/Course/Components/ReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function ReviewCard({
// list of professors (name1, name2, ..)
let professornames = '';
if (_review.professors && _review.professors.length > 0)
professornames += _review.professors.join(', ');
professornames += _review.professors.sort().join(', ');
else professornames += 'N/A';

if (isProfile) {
Expand Down

0 comments on commit 09d7767

Please sign in to comment.