refactor: 统一玩家端时间格式化方法并移除冗余本地时间工具
This commit is contained in:
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
|
||||
import { PlayerPanel } from "@/components/layout/player-panel";
|
||||
import { useCurrencyCatalog } from "@/hooks/use-currency-catalog";
|
||||
import { formatMinorAsCurrency } from "@/lib/money";
|
||||
import { formatLotteryInstant } from "@/lib/player-datetime";
|
||||
import { formatPlayerInstant } from "@/lib/player-datetime";
|
||||
import { playLabel } from "@/lib/play-labels";
|
||||
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
|
||||
import type { DrawResultListItem } from "@/types/api/draw-results";
|
||||
@@ -276,7 +276,7 @@ function WinningResultDialog({
|
||||
<div className="col-span-2">
|
||||
<p className="text-xs">{t("results.drawTime", { time: "" }).replace(":", "").trim()}</p>
|
||||
<p className="mt-1 font-semibold text-slate-900">
|
||||
{formatLotteryInstant(data.draw.draw_time_iso ?? data.draw.draw_time ?? null)}
|
||||
{formatPlayerInstant(data.draw.draw_time_iso ?? data.draw.draw_time ?? null)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@ import { JackpotResultsStrip } from "@/features/results/jackpot-results-strip";
|
||||
import { TwentyThreeResultsGrid } from "@/features/results/twenty-three-results-grid";
|
||||
import { useCurrencyCatalog } from "@/hooks/use-currency-catalog";
|
||||
import { getPlayerBearerTokenPayload } from "@/lib/lottery-auth";
|
||||
import { formatLotteryInstant } from "@/lib/player-datetime";
|
||||
import { formatPlayerInstant } from "@/lib/player-datetime";
|
||||
import { formatMinorAsCurrency } from "@/lib/money";
|
||||
import { norm4d } from "@/lib/norm-4d";
|
||||
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
|
||||
@@ -182,7 +182,7 @@ export function DrawResultDetailScreen({ drawNo }: DrawResultDetailScreenProps)
|
||||
</CardTitle>
|
||||
<CardDescription className="mt-1 font-mono text-xs text-slate-500">
|
||||
{t("results.drawTime", {
|
||||
time: formatLotteryInstant(data.draw_time_iso ?? data.draw_time ?? null),
|
||||
time: formatPlayerInstant(data.draw_time_iso ?? data.draw_time ?? null),
|
||||
})}
|
||||
</CardDescription>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ import { PlayerPanel } from "@/components/layout/player-panel";
|
||||
import { JackpotResultsStrip } from "@/features/results/jackpot-results-strip";
|
||||
import { TwentyThreeResultsGrid } from "@/features/results/twenty-three-results-grid";
|
||||
import { useCurrencyCatalog } from "@/hooks/use-currency-catalog";
|
||||
import { formatLotteryInstant } from "@/lib/player-datetime";
|
||||
import { formatPlayerInstant } from "@/lib/player-datetime";
|
||||
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
|
||||
import type { DrawResultListItem } from "@/types/api/draw-results";
|
||||
|
||||
@@ -244,7 +244,7 @@ export function DrawResultsListScreen() {
|
||||
</p>
|
||||
<p className="mt-1 font-mono text-xs text-slate-500">
|
||||
{t("results.drawTime", {
|
||||
time: formatLotteryInstant(
|
||||
time: formatPlayerInstant(
|
||||
featured.draw_time_iso ?? featured.draw_time ?? null,
|
||||
),
|
||||
})}
|
||||
@@ -283,7 +283,7 @@ export function DrawResultsListScreen() {
|
||||
{row.draw_no}
|
||||
</p>
|
||||
<p className="mt-1 text-[11px] text-slate-500">
|
||||
{formatLotteryInstant(row.draw_time_iso ?? row.draw_time ?? null)}
|
||||
{formatPlayerInstant(row.draw_time_iso ?? row.draw_time ?? null)}
|
||||
</p>
|
||||
</div>
|
||||
<span className="shrink-0 rounded-full bg-[#f2f6ff] px-2.5 py-1 text-xs font-bold text-[#0b56b7]">
|
||||
|
||||
Reference in New Issue
Block a user