added error handling
This commit is contained in:
parent
6431392576
commit
32972b0f8a
1 changed files with 366 additions and 367 deletions
|
|
@ -90,7 +90,7 @@ export default function ChatModal({
|
||||||
|
|
||||||
function handleOnClose(event: CloseEvent) {
|
function handleOnClose(event: CloseEvent) {
|
||||||
if (isOpen.current) {
|
if (isOpen.current) {
|
||||||
console.log(event);
|
setErrorData({ title: event.reason });
|
||||||
setLockChat(false);
|
setLockChat(false);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
connectWS();
|
connectWS();
|
||||||
|
|
@ -133,7 +133,6 @@ export default function ChatModal({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (data.type === "start") {
|
if (data.type === "start") {
|
||||||
console.log("start");
|
|
||||||
addChatHistory("", false);
|
addChatHistory("", false);
|
||||||
isStream = true;
|
isStream = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue