Files
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

29 lines
1.0 KiB
TypeScript

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