feat: add reply editor to post page

This commit is contained in:
Stevan Freeborn
2023-09-12 16:56:07 -05:00
parent 230d4b8b47
commit b441b781a0
4 changed files with 60 additions and 13 deletions
+4 -1
View File
@@ -36,7 +36,10 @@ export default function Editor({ post }: { post?: Doc<'posts'> }) {
];
const [mode, setMode] = useState<'write' | 'preview'>('write');
const { editorRef } = useCodeMirror({ doc: currentDoc, extensions });
const { editorRef } = useCodeMirror({
doc: currentDoc,
extensions,
});
async function handleSubmit(e: FormEvent<HTMLFormElement>) {
e.preventDefault();