Skip to content

Commit

Permalink
Compare Table will not display rmp data if there are no reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiramTadepalli committed Nov 10, 2024
1 parent cbf56ce commit 4028296
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/components/common/CompareTable/compareTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function GradeOrRmpRow<T>({
<Typography className="text-base">{loadingFiller}</Typography>
</Skeleton>
)) ||
(value.state === 'done' && getValue(value.data) !== -1 && (
(value.state === 'done' && getValue(value.data) > 0 && (
<Tooltip
title={`${name}: ${formatValue(getValue(value.data))}`}
placement="top"
Expand Down Expand Up @@ -274,16 +274,12 @@ function GradeAndRmpRow({
</Typography>
</Skeleton>
)) ||
(rmp.state === 'done' &&
getRmpValue(rmp.data as RMPInterface) == 0 && (
<CloseIcon />
)) ||
(rmp.state === 'done' &&
getRmpValue(rmp.data as RMPInterface) != 0 && (
<Typography className="text-base inline">
{rmpValue}
</Typography>
)) ||
(rmp.state === 'done' && rmpValue == 0 && <CloseIcon />) ||
(rmp.state === 'done' && rmpValue != 0 && (
<Typography className="text-base inline">
{rmpValue}
</Typography>
)) ||
null}
</span>
</Tooltip>
Expand Down

0 comments on commit 4028296

Please sign in to comment.