refactor: 重构奖池配置页面,移除冗余组件,优化加载体验与国际化支持
This commit is contained in:
@@ -27,7 +27,11 @@ import type {
|
||||
AdminJackpotPayoutLogsData,
|
||||
} from "@/types/api/admin-jackpot";
|
||||
|
||||
export function JackpotRecordsConsole() {
|
||||
type JackpotRecordsConsoleProps = {
|
||||
embedded?: boolean;
|
||||
};
|
||||
|
||||
export function JackpotRecordsConsole({ embedded = false }: JackpotRecordsConsoleProps) {
|
||||
const { t } = useTranslation(["jackpot", "common"]);
|
||||
const formatDt = useAdminDateTimeFormatter();
|
||||
const [drawNo, setDrawNo] = useState("");
|
||||
@@ -101,13 +105,8 @@ export function JackpotRecordsConsole() {
|
||||
return translated === key ? value : translated;
|
||||
};
|
||||
|
||||
return (
|
||||
<ModuleScaffold>
|
||||
<div className="mb-6">
|
||||
<h1 className="text-lg font-semibold tracking-tight">{t("recordsPage.title")}</h1>
|
||||
<p className="mt-1 text-sm text-muted-foreground">{t("recordsPage.description")}</p>
|
||||
</div>
|
||||
|
||||
const content = (
|
||||
<>
|
||||
<Card className="mb-6">
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="text-base">{t("filter")}</CardTitle>
|
||||
@@ -260,6 +259,12 @@ export function JackpotRecordsConsole() {
|
||||
) : null}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</ModuleScaffold>
|
||||
</>
|
||||
);
|
||||
|
||||
if (embedded) {
|
||||
return content;
|
||||
}
|
||||
|
||||
return <ModuleScaffold>{content}</ModuleScaffold>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user