Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix(web-app): replace the deleted toast when deleting a thread fails

thinhlpge152171d032f
diff --git a/web-app/src/hooks/useThreads.ts b/web-app/src/hooks/useThreads.ts
index 5fb0c37df..fd082782f 100644
--- a/web-app/src/hooks/useThreads.ts
+++ b/web-app/src/hooks/useThreads.ts
@@ -151,7 +151,9 @@ const deleteThreadEverywhere = (threadId: string, thread: Thread | undefined) =>
.deleteThread(threadId)
.catch((error) => {
console.error(`Could not delete thread ${threadId}:`, error)
+ // Same id as the dialog's "deleted" toast, so this replaces it.
toast.error(i18n.t('common:deleteThreadFailed'), {
+ id: 'delete-thread',
description: String(error),
})
})