Skip to content

Commit

Permalink
fix delta check
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenlejoe committed Feb 21, 2024
1 parent ab01cae commit 4037586
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Shared/BalancePriceDelta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const BalancePriceDelta: React.FC<BalancePriceDeltaProps> = ({
[numerator, denominator]
);

if (DELTA > 1) {
if (DELTA > 0) {
return (
<span className="text-success">
{DELTA.toLocaleString("en", { maximumFractionDigits: 2 })}%
</span>
);
} else if (DELTA < -1) {
} else if (DELTA < 0) {
return (
<span className="text-danger">
{DELTA.toLocaleString("en", { maximumFractionDigits: 2 })}%
Expand Down

0 comments on commit 4037586

Please sign in to comment.