fix: Implement archive chat handler in Chat page navbar (#22229)
This commit is contained in:
@@ -154,8 +154,14 @@
|
||||
};
|
||||
|
||||
const archiveChatHandler = async (id) => {
|
||||
await archiveChatById(localStorage.token, id);
|
||||
dispatch('change');
|
||||
try {
|
||||
await archiveChatById(localStorage.token, id);
|
||||
dispatch('change');
|
||||
toast.success($i18n.t('Chat archived.'));
|
||||
} catch (error) {
|
||||
console.error('Error archiving chat:', error);
|
||||
toast.error($i18n.t('Failed to archive chat.'));
|
||||
}
|
||||
};
|
||||
|
||||
const moveChatHandler = async (chatId, folderId) => {
|
||||
|
||||
Reference in New Issue
Block a user