added error handling

This commit is contained in:
anovazzi1 2023-05-10 20:30:14 -03:00
commit 32972b0f8a

View file

@ -90,7 +90,7 @@ export default function ChatModal({
function handleOnClose(event: CloseEvent) {
if (isOpen.current) {
console.log(event);
setErrorData({ title: event.reason });
setLockChat(false);
setTimeout(() => {
connectWS();
@ -133,7 +133,6 @@ export default function ChatModal({
});
}
if (data.type === "start") {
console.log("start");
addChatHistory("", false);
isStream = true;
}