refactor: 重构奖池配置页面,移除冗余组件,优化加载体验与国际化支持
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
import { JackpotSubNav } from "@/modules/jackpot/jackpot-subnav";
|
||||
import { JackpotPoolsConsole } from "@/modules/jackpot/jackpot-pools-console";
|
||||
import { Suspense } from "react";
|
||||
|
||||
import { JackpotConfigScreen } from "@/modules/jackpot/jackpot-config-screen";
|
||||
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
|
||||
import type { Metadata } from "next";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `奖池配置 · ${jackpotModuleMeta.title}`,
|
||||
title: jackpotModuleMeta.title,
|
||||
};
|
||||
|
||||
export default function AdminConfigJackpotPage() {
|
||||
return (
|
||||
<div className="w-full max-w-none px-1">
|
||||
<JackpotSubNav />
|
||||
<div className="mx-auto mb-6 max-w-5xl">
|
||||
<h1 className="text-lg font-semibold tracking-tight">{jackpotModuleMeta.title}</h1>
|
||||
</div>
|
||||
<JackpotPoolsConsole />
|
||||
</div>
|
||||
<Suspense
|
||||
fallback={<p className="text-sm text-muted-foreground">Loading…</p>}
|
||||
>
|
||||
<JackpotConfigScreen />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
import { JackpotSubNav } from "@/modules/jackpot/jackpot-subnav";
|
||||
import { JackpotRecordsConsole } from "@/modules/jackpot/jackpot-records-console";
|
||||
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
|
||||
import type { Metadata } from "next";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: jackpotModuleMeta.title,
|
||||
};
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
/** 旧路径保留跳转,避免书签失效 */
|
||||
export default function AdminConfigJackpotRecordsPage() {
|
||||
return (
|
||||
<div className="w-full max-w-none px-1">
|
||||
<JackpotSubNav />
|
||||
<JackpotRecordsConsole />
|
||||
</div>
|
||||
);
|
||||
redirect("/admin/config/jackpot#records");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function AdminJackpotRecordsRedirectPage() {
|
||||
redirect("/admin/config/jackpot/records");
|
||||
redirect("/admin/config/jackpot#records");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user