Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Updated `getPublicCurrencies` and `getPlayerAuthCaptcha` functions to include `skipGlobalServerError` option, improving error handling for API requests. - Refactored the NotFoundPage component to enhance mobile responsiveness and UI consistency, integrating `PlayerMobileViewport`. - Improved the NetworkStatusBanner and OfflineBanner components by adding player banner height reference for better layout management. - Updated Wallet components to utilize `PlayerMoneyDisplay` for consistent currency representation and added credit mode handling in various screens. - Enhanced the WalletScreen and Transfer screens with loading panels and credit guard logic for better user experience during wallet operations.
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
"use client";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { PlayerPanel } from "@/components/layout/player-panel";
|
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
import { isCreditFundingPlayer } from "@/lib/player-funding-mode";
|
|
import { usePlayerSessionStore } from "@/stores/player-session-store";
|
|
|
|
type WalletTransferLoadingPanelProps = {
|
|
titleKey: "wallet.transferInTitle" | "wallet.transferOutTitle";
|
|
};
|
|
|
|
export function WalletTransferLoadingPanel({ titleKey }: WalletTransferLoadingPanelProps) {
|
|
const { t } = useTranslation("player");
|
|
const creditMode = isCreditFundingPlayer(usePlayerSessionStore((state) => state.profile));
|
|
const backLabel = creditMode
|
|
? t("wallet.creditTitle", { defaultValue: "信用" })
|
|
: t("wallet.title");
|
|
|
|
return (
|
|
<PlayerPanel title={t(titleKey)} backHref="/wallet" backLabel={backLabel}>
|
|
<div className="space-y-3">
|
|
<Skeleton className="h-8 w-40" />
|
|
<Skeleton className="h-48 w-full rounded-xl" />
|
|
</div>
|
|
</PlayerPanel>
|
|
);
|
|
}
|