change responsive]

This commit is contained in:
2026-05-31 11:51:52 +03:30
parent 06568c5858
commit 023b8ee5be
124 changed files with 6296 additions and 4233 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { Wallet } from '@/model/wallet'
export function getWallets(wallet?: Wallet | Wallet[]): Wallet[] {
if (!wallet) return []
return Array.isArray(wallet) ? wallet : [wallet]
}
export function getCashBalance(wallet?: Wallet | Wallet[]): number {
return getWallets(wallet)[0]?.cash ?? 0
}
export function getGoldBalance(wallet?: Wallet | Wallet[]): string {
const sum = getWallets(wallet).reduce((total, item) => total + (item.gold ?? 0), 0)
return sum.toFixed(3)
}