fix: Implement archive chat handler in Chat page navbar (#22229)

This commit is contained in:
Shirasawa
2026-03-04 13:54:21 -06:00
committed by GitHub
parent a36692b4a2
commit 5af24b3ebe
2 changed files with 29 additions and 3 deletions
@@ -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) => {