import { createClient } from "@/utils/supabase/server"; import { notFound } from "next/navigation"; import PostEditor from "../../../components/PostEditor"; import { updatePost } from "../../actions"; interface PageProps { params: Promise<{ id: string }>; } export default async function EditPostPage({ params }: PageProps) { const { id } = await params; const supabase = await createClient(); const { data: post, error } = await supabase .from("posts") .select("*") .eq("id", id) .single(); if (error || !post) { notFound(); } const { data: authors } = await supabase .from("authors") .select("name") .order("name"); return (

Edit Post

); }