Skip to content

Commit

Permalink
hide if less than zero (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmzwar authored Jun 22, 2024
1 parent 81b0d88 commit 34c6d9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion liquidity/ui/src/components/Pools/CollateralSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ export const CollateralSectionUi: FC<{
) : (
<Tooltip label="APR is a combination of past week pool performance and rewards.">
<Text fontWeight={700} fontSize="xl" color="white">
{`${!!apr ? `${network?.id === 42161 ? 'Up to ' : ''}${apr.toFixed(2)}` : '-'}%`}
{`${
!!apr && apr > 0
? `${network?.id === 42161 ? 'Up to ' : ''}${apr.toFixed(2)}`
: '-'
}%`}
</Text>
</Tooltip>
)}
Expand Down

0 comments on commit 34c6d9f

Please sign in to comment.