diff --git a/driver-pwa/frontend/src/pages/BalancePage.tsx b/driver-pwa/frontend/src/pages/BalancePage.tsx index 2ca0dba..169d3a5 100644 --- a/driver-pwa/frontend/src/pages/BalancePage.tsx +++ b/driver-pwa/frontend/src/pages/BalancePage.tsx @@ -13,14 +13,14 @@ export function BalancePage() { const { data, isLoading, isError, refetch } = useQuery({ queryKey: ["balance"], queryFn: getBalance }); const accounts = data?.accounts ?? []; - const totalDebt = accounts.filter((a) => a.balance < 0).reduce((s, a) => s + a.balance, 0); + const total = accounts.reduce((s, a) => s + a.balance, 0); return (
-

Общий долг

-

{formatMoney(totalDebt)}

+

Баланс

+

{formatMoney(total)}

{isLoading ? (