feat: update chat view response style

This commit is contained in:
Steven
2023-03-19 20:30:57 +08:00
parent 208c894db8
commit 262d6904d3
6 changed files with 27 additions and 35 deletions

View File

@ -38,22 +38,15 @@ const MessageTextarea = (props: Props) => {
return;
}
const currentChat = chatStore.currentChat;
if (currentChat.isRequesting) {
toast.error("Please wait for the previous message to be sent.");
return;
}
messageStore.addMessage({
id: generateUUID(),
chatId: currentChat.id,
chatId: chatStore.currentChat.id,
creatorId: userStore.currentUser.id,
createdAt: Date.now(),
content: value,
});
setValue("");
textareaRef.current!.value = "";
await sendMessage();
};