Files
buzz-sheet/app/admin/image/constellation/page.tsx
T
gunshiz 9580407a90
CI / Verify (push) Successful in 1m56s
CI / Build immutable images and deploy (push) Successful in 3m12s
perf : cache
2026-10-08 23:21:34 +07:00

26 lines
997 B
TypeScript

import { redirect } from "next/navigation";
import { connection } from "next/server";
import { ConstellationImageGenerator } from "@/components/admin/constellation-image-generator";
import { getCachedCatalogOptions } from "@/lib/cache/catalog";
export default async function ConstellationImagePage() {
await connection();
const catalog = await getCachedCatalogOptions();
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">สร้างภาพ Constellation</h1>
<p className="mt-2 text-muted-foreground">
สร้างกราฟดาเมจ Constellation จาก Catalog โดยไม่บันทึกข้อมูลลง Guide
</p>
</header>
<ConstellationImageGenerator characters={catalog.characters} />
</div>
);
}