"use client"; import { useState } from "react"; import dynamic from "next/dynamic"; import Image from "next/image"; import { Button } from "@/components/ui/button"; import { RiCloseFill } from "react-icons/ri"; import { Avatar, AvatarImage, AvatarFallback } from "@radix-ui/react-avatar"; import { useRouter } from "next/navigation"; import { formatDate } from "@/lib/utils/dates"; import Actions from "./Actions"; import { NDKEvent } from "@nostr-dev-kit/ndk"; import { getTagAllValues, getTagValues } from "@/lib/nostr/utils"; import Editor from "@/components/LongForm/Editor"; import { Toolbar } from "@/components/LongForm/ToolBar"; type ArticleProps = { event?: NDKEvent; }; export default function EditorPage({ event }: ArticleProps) { const router = useRouter(); const [content, setContent] = useState(""); async function handleSubmit({ title, summary, image, }: { title: string; summary: string; image?: string; }) { console.log("Writing", title, summary, image, content); } return (