feat: refine wallet credit mode detection and improve UI consistency across multiple screens
Some checks failed
lotteryfront CI / build (push) Has been cancelled
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Updated wallet screens to check both balance and profile for credit funding mode, ensuring consistent credit player detection - Removed currency switcher from hall header and schedule timezone display from draw panel for cleaner UI - Simplified ticket orders status filter to single-select mode with improved visual hierarchy - Added sizes="100vw" attribute to entry and login background images for proper
This commit is contained in:
@@ -20,6 +20,7 @@ import { isCreditFundingPlayer } from "@/lib/player-funding-mode";
|
||||
import { PLAYER_CURRENCY_CHANGE_EVENT } from "@/lib/player-currency-preference";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useNetworkConnectionStore } from "@/stores/network-connection-store";
|
||||
import { usePlayerSessionStore } from "@/stores/player-session-store";
|
||||
|
||||
const BALANCE_KEY = (currency: string) => ["wallet/balance", currency];
|
||||
|
||||
@@ -62,7 +63,8 @@ export function HallWalletStrip() {
|
||||
}, [isDegraded]);
|
||||
|
||||
const availableMinor = Number(balance?.available_balance ?? balance?.balance ?? 0);
|
||||
const isCreditPlayer = isCreditFundingPlayer(balance);
|
||||
const profile = usePlayerSessionStore((s) => s.profile);
|
||||
const isCreditPlayer = isCreditFundingPlayer(balance) || isCreditFundingPlayer(profile);
|
||||
const balanceMinor = Number(balance?.balance ?? 0);
|
||||
const headlineMinor = isCreditPlayer ? availableMinor : balanceMinor;
|
||||
const transferInLotteryMinor = isCreditPlayer ? availableMinor : balanceMinor;
|
||||
|
||||
Reference in New Issue
Block a user