fix: chat list issues

This commit is contained in:
Timothy J. Baek 2024-03-08 13:58:56 -08:00
parent 9881022b11
commit 404aa62a8a
2 changed files with 11 additions and 6 deletions

View file

@ -61,12 +61,16 @@
};
const editChatTitle = async (id, _title) => {
title = _title;
if (_title === '') {
toast.error('Title cannot be an empty string.');
} else {
title = _title;
await updateChatById(localStorage.token, id, {
title: _title
});
await chats.set(await getChatList(localStorage.token));
await updateChatById(localStorage.token, id, {
title: _title
});
await chats.set(await getChatList(localStorage.token));
}
};
const deleteChat = async (id) => {
@ -388,6 +392,7 @@
show = false;
}
}}
draggable="false"
>
<div class=" flex self-center flex-1 w-full">
<div