import PostForm from "../PostForm";

export default async function NewPostPage({
  searchParams,
}: {
  searchParams: Promise<{ error?: string }>;
}) {
  const { error } = await searchParams;
  return (
    <div className="rb-admin-page">
      <h1 className="rb-admin-h1">New post</h1>
      <PostForm titleError={error === "title"} />
    </div>
  );
}
