feat: enhance API error handling and UI improvements
Some checks failed
lotteryfront CI / build (push) Has been cancelled
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.
This commit is contained in:
@@ -3,13 +3,12 @@
|
||||
import Link from "next/link";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { CalendarRange, ChevronDown, Search } from "lucide-react";
|
||||
import { CalendarRange, Check, ChevronDown, Search } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { getDrawCurrent } from "@/api/draw";
|
||||
import { getTicketItems } from "@/api/ticket-items";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Calendar } from "@/components/ui/calendar";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { PlayerPanel } from "@/components/layout/player-panel";
|
||||
@@ -203,10 +202,7 @@ export function TicketOrdersListScreen() {
|
||||
}, [fetchPage, lastPage, loading, loadingMore, page]);
|
||||
|
||||
return (
|
||||
<PlayerPanel
|
||||
title={t("orders.title")}
|
||||
containerClassName="max-w-[720px]"
|
||||
>
|
||||
<PlayerPanel title={t("orders.title")}>
|
||||
<div className="space-y-3">
|
||||
<div className="rounded-2xl border border-[#dfe9f8] bg-white p-3 shadow-[0_10px_28px_rgba(15,23,42,0.05)] sm:p-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
@@ -381,7 +377,17 @@ export function TicketOrdersListScreen() {
|
||||
);
|
||||
}}
|
||||
>
|
||||
<Checkbox className="size-3.5" checked={checked} />
|
||||
<span
|
||||
className={cn(
|
||||
"flex size-3.5 shrink-0 items-center justify-center rounded border",
|
||||
checked
|
||||
? "border-[#0b56b7] bg-[#0b56b7] text-white"
|
||||
: "border-slate-300 bg-white",
|
||||
)}
|
||||
aria-hidden
|
||||
>
|
||||
{checked ? <Check className="size-2.5" strokeWidth={3} /> : null}
|
||||
</span>
|
||||
<span className="truncate">{t(`ticketStatus.${status}`, { defaultValue: status })}</span>
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user