fix: display zero-amount transactions with neutral styling

Zero-amount transactions (e.g. free tariff switches) now show without +/- sign in neutral gray instead of misleading green +0.00
This commit is contained in:
Fringg
2026-03-11 02:17:40 +03:00
parent 8dab6dc8fb
commit 6fd76c8dc8

View File

@@ -334,10 +334,15 @@ export default function Balance() {
animate="animate"
>
{transactions.items.map((tx) => {
const isPositive = tx.amount_rubles >= 0;
const isZero = tx.amount_rubles === 0;
const isPositive = tx.amount_rubles > 0;
const displayAmount = Math.abs(tx.amount_rubles);
const sign = isPositive ? '+' : '-';
const colorClass = isPositive ? 'text-success-400' : 'text-error-400';
const sign = isZero ? '' : isPositive ? '+' : '-';
const colorClass = isZero
? 'text-dark-400'
: isPositive
? 'text-success-400'
: 'text-error-400';
return (
<motion.div