diff options
| author | Max Nanis | 2026-09-13 10:41:49 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-09-13 10:41:49 -0700 |
| commit | 83821dff9984fb950e53f23baf99d7a74fb88abd (patch) | |
| tree | dc1246129c546e5519480db2e0500a01cd0f866f /jb-ui/src/components/Wallet.tsx | |
| parent | b2261f9101480afb31322cf620f028cdade0671c (diff) | |
| download | amt-jb-83821dff9984fb950e53f23baf99d7a74fb88abd.tar.gz amt-jb-83821dff9984fb950e53f23baf99d7a74fb88abd.zip | |
refrences to HIT removed. Still can't test. Basic CashoutMethod retrival until backup updated. use of the new Wallets endpoint.
Diffstat (limited to 'jb-ui/src/components/Wallet.tsx')
| -rw-r--r-- | jb-ui/src/components/Wallet.tsx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/jb-ui/src/components/Wallet.tsx b/jb-ui/src/components/Wallet.tsx index 3f5c6a4..3bb23a9 100644 --- a/jb-ui/src/components/Wallet.tsx +++ b/jb-ui/src/components/Wallet.tsx @@ -54,7 +54,13 @@ const getBackgroundColor = (balance: number | undefined): string => { const WalletHeader = () => { const amount = - useAppSelector((state) => state.app.userWalletBalance)?.amount ?? 0; + useAppSelector((state) => state.app.userDisplayedWalletBalance?.amount) ?? + 0; + + const amount_string = + useAppSelector( + (state) => state.app.userDisplayedWalletBalance?.amount_string, + ) ?? "$0.00"; const bgStyle = typeof getBackgroundColor(amount) === "string" && @@ -77,13 +83,9 @@ const WalletHeader = () => { <span className="text-left">User Wallet:</span> {amount >= 0 ? ( - <span className="text-emerald-50"> - {`${formatCentsToUSD(Math.abs(amount))}`} - </span> + <span className="text-emerald-50">{`${amount_string}`}</span> ) : ( - <span className="text-rose-50"> - {`(${formatCentsToUSD(Math.abs(amount))})`} - </span> + <span className="text-rose-50">{`(${amount_string})`}</span> )} </h2> </div> @@ -93,6 +95,10 @@ const WalletHeader = () => { const WalletSummary = () => { const summary = useAppSelector((state) => state.app.userLedgerSummary); + const userWallet = useAppSelector((state) => state.app.userWallet); + + userWallet; + const survey_completes = summary?.bp_payment?.entry_count ?? 0; const survey_completes_f = (survey_completes ?? 0).toLocaleString("en-US"); |
