import { createClient } from "@/utils/supabase/server"; import { deleteComment } from "./actions"; export default async function AdminCommentsPage() { const supabase = await createClient(); const { data: comments } = await supabase .from("comments") .select("id, name, email, comment, post_id, created_at") .order("created_at", { ascending: false }); return (
| Author | Comment | Post | Date | Actions |
|---|---|---|---|---|
|
{comment.name} {comment.email} |
{comment.comment} |
{comment.post_id} | {new Date(comment.created_at).toLocaleDateString()} |
No comments found.
)}