import { connection } from "next/server"; import { redirect } from "next/navigation"; import { AdminHeader } from "@/components/admin/admin-header"; import { AdminCommentInbox } from "@/components/comments/admin-comment-inbox"; import { getCommentViewer, listComments, listCommentTargets } from "@/lib/comments/repository"; export default async function AdminCommentsPage({ searchParams }: { searchParams: Promise<{ target?: string; comment?: string }> }) { await connection(); const viewer = await getCommentViewer(); if (!viewer?.admin) redirect("/auth/login?next=%2Fadmin%2Fcomments"); const query = await searchParams; const initialTarget = query.target; const initialComment = initialTarget && query.comment && /^[0-9a-f-]{36}$/i.test(query.comment) ? query.comment : undefined; const [initial, targets] = await Promise.all([listComments({ viewer, inbox: true, grouped: true, target: initialTarget }), listCommentTargets()]); return <>

ความคิดเห็น

ตอบกลับและจัดการความคิดเห็นจากทุกไกด์และทุกรอบ Stygian

; }