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
@ -23,7 +23,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
chat.isSend ? "bg-gray-900" : "bg-gray-200"
)}
>
{!chat.isSend && <img className="scale-150" src={AiIcon} />}
{!chat.isSend && <img className="scale-150" src={AiIcon}/>}
{chat.isSend && <UserIcon className="w-6 h-6 -mb-1 text-gray-200" />}
</div>
{!chat.isSend ? (

View file

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