pl-fe: do not clear editor before sending post

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-26 22:47:12 +02:00
parent cd3c35fcf9
commit b9475efdec
2 changed files with 6 additions and 4 deletions

View File

@ -142,9 +142,9 @@ const ComposeForm = <ID extends string>({ id, shouldCondense, autoFocus, clickab
if (!canSubmit) return;
e?.preventDefault();
dispatch(submitCompose(id, { history })).then(() => {
dispatch(submitCompose(id, { history, onSuccess: () => {
editorRef.current?.dispatchCommand(CLEAR_EDITOR_COMMAND, undefined);
}).catch(() => {});
} }));
};
const onSuggestionsClearRequested = () => {