mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +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"
|
animate="animate"
|
||||||
>
|
>
|
||||||
{transactions.items.map((tx) => {
|
{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 displayAmount = Math.abs(tx.amount_rubles);
|
||||||
const sign = isPositive ? '+' : '-';
|
const sign = isZero ? '' : isPositive ? '+' : '-';
|
||||||
const colorClass = isPositive ? 'text-success-400' : 'text-error-400';
|
const colorClass = isZero
|
||||||
|
? 'text-dark-400'
|
||||||
|
: isPositive
|
||||||
|
? 'text-success-400'
|
||||||
|
: 'text-error-400';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
Reference in New Issue
Block a user