fix: update chat title

This commit is contained in:
Jing Hua 2023-03-04 21:37:11 +08:00
parent 8f7a859691
commit 5f673691b1

View file

@ -86,6 +86,7 @@ const ChatHistory = ({
const updatedChats = JSON.parse(JSON.stringify(chats)); const updatedChats = JSON.parse(JSON.stringify(chats));
if (isEdit) { if (isEdit) {
updatedChats[chatIndex].title = _title; updatedChats[chatIndex].title = _title;
setChats(updatedChats);
setIsEdit(false); setIsEdit(false);
} else if (isDelete) { } else if (isDelete) {
updatedChats.splice(chatIndex, 1); updatedChats.splice(chatIndex, 1);