30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { redirect } from "next/navigation";
|
|
import { connection } from "next/server";
|
|
|
|
import { TeamImageGenerator } from "@/components/admin/team-image-generator";
|
|
import { getActiveCatalog } from "@/lib/guides/queries";
|
|
|
|
export default async function TeamImagePage() {
|
|
await connection();
|
|
|
|
const catalog = await getActiveCatalog();
|
|
if (!catalog) redirect("/admin?sync=required");
|
|
|
|
return (
|
|
<div className="flex flex-col gap-8">
|
|
<header>
|
|
<p className="text-sm font-medium text-primary">Image generator</p>
|
|
<h1 className="font-heading text-3xl font-semibold">สร้างภาพ Team Calc</h1>
|
|
<p className="mt-2 text-muted-foreground">
|
|
สร้างภาพ Team แบบเดียวกับหน้า Guide โดยไม่บันทึกข้อมูลลง Guide
|
|
</p>
|
|
</header>
|
|
<TeamImageGenerator
|
|
characters={catalog.characters}
|
|
weapons={catalog.weapons}
|
|
artifacts={catalog.artifacts}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|