async function changed to then
This commit is contained in:
parent
77fab44e60
commit
820fd1aefe
1 changed files with 3 additions and 4 deletions
|
|
@ -79,16 +79,15 @@ export default function Chat({ nodes, edges }) {
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-y-0 right-0 flex items-center pr-3">
|
<div className="absolute inset-y-0 right-0 flex items-center pr-3">
|
||||||
<button
|
<button
|
||||||
onClick={async () => {
|
onClick={() => {
|
||||||
let message = chatValue;
|
let message = chatValue;
|
||||||
setChatValue("");
|
setChatValue("");
|
||||||
addChatHistory(message, true);
|
addChatHistory(message, true);
|
||||||
let returnValue = await sendAll({
|
sendAll({
|
||||||
message,
|
message,
|
||||||
nodes,
|
nodes,
|
||||||
edges,
|
edges,
|
||||||
});
|
}).then((r) => {addChatHistory(r, false)});
|
||||||
addChatHistory(returnValue, false);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PaperAirplaneIcon
|
<PaperAirplaneIcon
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue