avoiding error 1005 message

This commit is contained in:
anovazzi1 2023-04-26 00:59:41 -03:00
commit f7989aca85
2 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
<div
className={classNames(
"w-full py-2 pl-2 flex",
chat.isSend ? "bg-white" : "bg-gray-200"
chat.isSend ? "bg-gray-100" : "bg-gray-200"
)}
>
<div

View file

@ -115,9 +115,9 @@ export default function ChatModal({
console.log(data);
}
} catch (error) {
if(event.data!=="Error: 1005"){
setErrorData({ title: event.data });
if (newWs.readyState === newWs.CLOSED) {
window.alert(error);
}
}
};