On send, disable message field before doing anything async

This commit is contained in:
Scott Nonnenberg 2022-06-13 09:30:14 -07:00 committed by GitHub
parent 740d8e4c96
commit 5c8b4bca7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -270,13 +270,13 @@ export const CompositionArea = ({
const handleSubmit = useCallback(
(message: string, mentions: Array<BodyRangeType>, timestamp: number) => {
setLarge(false);
onSendMessage({
draftAttachments,
mentions,
message,
timestamp,
});
setLarge(false);
},
[draftAttachments, onSendMessage, setLarge]
);