avoiding error 1005 message
This commit is contained in:
parent
38ec55db77
commit
f7989aca85
2 changed files with 5 additions and 5 deletions
|
|
@ -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 ? (
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue