Skip to content

Commit 7e372f0

Browse files
asizikovCopilot
andcommitted
fix: align overview pricing verdict
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 09003db commit 7e372f0

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/App.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,23 @@ function App() {
414414
const periodLabel = rangeStart
415415
? new Date(rangeStart + 'T00:00:00').toLocaleString('en-US', { month: 'long', year: 'numeric' })
416416
: null
417-
return savings > 0 && periodLabel ? (
417+
return periodLabel ? (
418418
<p className="comparison-framing">
419-
Your <strong>{periodLabel}</strong> usage would cost{' '}
420-
<strong>{formatUsd(savings)} less</strong> under token-based pricing
419+
{savings > 0 ? (
420+
<>
421+
Your <strong>{periodLabel}</strong> usage would cost{' '}
422+
<strong>{formatUsd(savings)} less</strong> under token-based pricing
423+
</>
424+
) : savings < 0 ? (
425+
<>
426+
Your <strong>{periodLabel}</strong> usage would cost{' '}
427+
<strong>{formatUsd(Math.abs(savings))} more</strong> under token-based pricing
428+
</>
429+
) : (
430+
<>
431+
Your <strong>{periodLabel}</strong> usage cost would be the same under token-based pricing
432+
</>
433+
)}
421434
</p>
422435
) : null
423436
})()}

0 commit comments

Comments
 (0)