mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user