diff --git a/src/components/common/SingleProfInfo/singleProfInfo.tsx b/src/components/common/SingleProfInfo/singleProfInfo.tsx index ac989b0f..0f62b094 100644 --- a/src/components/common/SingleProfInfo/singleProfInfo.tsx +++ b/src/components/common/SingleProfInfo/singleProfInfo.tsx @@ -116,11 +116,15 @@ function SingleProfInfo({ rmp }: Props) { return ( -

{rmp.data.avgRating}

+

+ {rmp.data.avgRating > 0 ? rmp.data.avgRating : 'N/A'} +

Professor rating

-

{rmp.data.avgDifficulty}

+

+ {rmp.data.avgDifficulty > 0 ? rmp.data.avgDifficulty : 'N/A'} +

Difficulty

@@ -131,7 +135,9 @@ function SingleProfInfo({ rmp }: Props) {

- {rmp.data.wouldTakeAgainPercent.toFixed(0) + '%'} + {rmp.data.wouldTakeAgainPercent > 0 + ? rmp.data.wouldTakeAgainPercent.toFixed(0) + '%' + : 'N/A'}

Would take again

diff --git a/src/components/compare/CompareTable/compareTable.tsx b/src/components/compare/CompareTable/compareTable.tsx index 9bf85eee..42229817 100644 --- a/src/components/compare/CompareTable/compareTable.tsx +++ b/src/components/compare/CompareTable/compareTable.tsx @@ -141,7 +141,7 @@ function GradeOrRmpRow({ {loadingFiller} )) || - (value.state === 'done' && + (value.state === 'done' && getValue(value.data) !== -1 ? ( (name !== 'GPA' ? (value.data as RMPInterface).numRatings > 0 : true) && ( // do not display RMP data (non-GPA data) if there are no reviews @@ -165,7 +165,10 @@ function GradeOrRmpRow({ {formatValue(getValue(value.data))} - )) || + ) + ) : ( + 0.00 + )) || null} ))}