import { notFound } from "next/navigation";
import { getRow } from "@/lib/data";
import { TABLES } from "@/lib/appwrite-rest";
import type { SeoPageRow } from "@/lib/types";
import { SeoPageForm } from "../../page-form";

export default async function EditSeoPage({
  params,
}: {
  params: Promise<{ id: string }>;
}) {
  const { id } = await params;
  const row = await getRow<SeoPageRow>(TABLES.seoPages, id);
  if (!row) notFound();
  return <SeoPageForm row={row} />;
}
