Content workspace
Guide Dashboard
จัดการ Guide แบบภาพ-first และบันทึกขึ้นเว็บไซต์ทันที
import { redirect } from "next/navigation"; import { connection } from "next/server"; import { StructuredDashboard } from "@/components/admin/structured-dashboard"; import { AdminHeader } from "@/components/admin/admin-header"; import { LiveRefresh } from "@/components/live-refresh"; import { getAdminSession } from "@/lib/auth/server"; import { getCurrentCatalogVersion } from "@/lib/catalog/sync"; import { listGuideCards } from "@/lib/guides/queries"; export const instant = false; export default async function AdminPage() { await connection(); if (!(await getAdminSession())) redirect("/auth/login?next=%2Fadmin"); const [guides, trash, catalogVersion] = await Promise.all([ listGuideCards(), listGuideCards(true), getCurrentCatalogVersion(), ]); return (
Content workspace
จัดการ Guide แบบภาพ-first และบันทึกขึ้นเว็บไซต์ทันที