From 09d7767c8b51915b9a13eb9140c75288273e65e9 Mon Sep 17 00:00:00 2001 From: mjaydenkim Date: Mon, 13 Jan 2025 19:51:20 -0500 Subject: [PATCH] Sort professor names in review cards --- client/src/modules/Course/Components/PreviewReviewCard.tsx | 2 +- client/src/modules/Course/Components/ReviewCard.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/modules/Course/Components/PreviewReviewCard.tsx b/client/src/modules/Course/Components/PreviewReviewCard.tsx index b651ef81..2a0f4508 100644 --- a/client/src/modules/Course/Components/PreviewReviewCard.tsx +++ b/client/src/modules/Course/Components/PreviewReviewCard.tsx @@ -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) { diff --git a/client/src/modules/Course/Components/ReviewCard.tsx b/client/src/modules/Course/Components/ReviewCard.tsx index c8e976ee..536f7549 100644 --- a/client/src/modules/Course/Components/ReviewCard.tsx +++ b/client/src/modules/Course/Components/ReviewCard.tsx @@ -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) {