refac: toast error

This commit is contained in:
Timothy Jaeryang Baek
2025-01-20 22:41:32 -08:00
parent af48f346f1
commit a863f98c53
52 changed files with 123 additions and 123 deletions
@@ -48,7 +48,7 @@
const updatedUser = await updateUserProfile(localStorage.token, name, profileImageUrl).catch(
(error) => {
toast.error(error);
toast.error(`${error}`);
}
);
@@ -14,7 +14,7 @@
if (newPassword === newPasswordConfirm) {
const res = await updateUserPassword(localStorage.token, currentPassword, newPassword).catch(
(error) => {
toast.error(error);
toast.error(`${error}`);
return null;
}
);
@@ -77,7 +77,7 @@
const archiveAllChatsHandler = async () => {
await goto('/');
await archiveAllChats(localStorage.token).catch((error) => {
toast.error(error);
toast.error(`${error}`);
});
currentChatPage.set(1);
@@ -88,7 +88,7 @@
const deleteAllChatsHandler = async () => {
await goto('/');
await deleteAllChats(localStorage.token).catch((error) => {
toast.error(error);
toast.error(`${error}`);
});
currentChatPage.set(1);
@@ -17,7 +17,7 @@
loading = true;
const res = await addNewMemory(localStorage.token, content).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -28,7 +28,7 @@
loading = true;
const res = await updateMemoryById(localStorage.token, memory.id, content).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -124,7 +124,7 @@
localStorage.token,
memory.id
).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});
@@ -177,7 +177,7 @@
class=" px-3.5 py-1.5 font-medium text-red-500 hover:bg-black/5 dark:hover:bg-white/5 outline outline-1 outline-red-300 dark:outline-red-800 rounded-3xl"
on:click={async () => {
const res = await deleteMemoriesByUserId(localStorage.token).catch((error) => {
toast.error(error);
toast.error(`${error}`);
return null;
});