From 5211a7698b83ab66681add856aeff0eca21d77f7 Mon Sep 17 00:00:00 2001 From: Tyler Hill Date: Wed, 3 Jan 2024 14:02:09 -0600 Subject: [PATCH] Reverse sort --- src/data/builder.ts | 2 +- src/pages/ProfessorProfile.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/builder.ts b/src/data/builder.ts index 5b13b2b..17fe052 100644 --- a/src/data/builder.ts +++ b/src/data/builder.ts @@ -116,7 +116,7 @@ export async function buildProfessorProfiles(payload: ShowCourseTabPayload) { : rmps[i]?.wouldTakeAgainPercent : undefined, rmpTags: rmps[i]?.teacherRatingTags - .sort((a, b) => a.tagCount - b.tagCount) + .sort((a, b) => b.tagCount - a.tagCount) .map((tag) => tag.tagName), gradeDistribution: [ { diff --git a/src/pages/ProfessorProfile.tsx b/src/pages/ProfessorProfile.tsx index 76f61f7..c3466ba 100644 --- a/src/pages/ProfessorProfile.tsx +++ b/src/pages/ProfessorProfile.tsx @@ -43,7 +43,7 @@ export const ProfessorProfile = () => { {' '} {/* RMP Tag area */} {professorData.rmpTags - ?.slice(0, 4) + ?.slice(0, 5) .map((item: string, index: number) => ( ))}