Skip to content

Commit

Permalink
[OPIK-440]: improve code readability;
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha committed Nov 29, 2024
1 parent ecf7421 commit 7aa8ca1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/opik-frontend/src/lib/money.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export const formatCost = (

const numValue = Number(value);

if (short && numValue < MIN_DISPLAYED_COST) {
return `<${CURRENCY}${MIN_DISPLAYED_COST}`;
if (!short) {
return `${CURRENCY}${value}`;
}

if (short) {
return `${CURRENCY}${floor(numValue, PRECISION)}`;
if (numValue < MIN_DISPLAYED_COST) {
return `<${CURRENCY}${MIN_DISPLAYED_COST}`;
}

return `${CURRENCY}${value}`;
return `${CURRENCY}${floor(numValue, PRECISION)}`;
};

0 comments on commit 7aa8ca1

Please sign in to comment.