This commit is contained in:
Timothy Jaeryang Baek 2025-07-31 16:27:20 +04:00
parent d3547f0f54
commit 1c83f48c45

View file

@ -114,6 +114,8 @@
} else {
// Handle the drag-and-drop data for folders or chats (same as before)
const dataTransfer = e.dataTransfer.getData('text/plain');
try {
const data = JSON.parse(dataTransfer);
console.log(data);
@ -157,17 +159,22 @@
}
// Move the chat
const res = await updateChatFolderIdById(localStorage.token, chat.id, folderId).catch(
(error) => {
const res = await updateChatFolderIdById(
localStorage.token,
chat.id,
folderId
).catch((error) => {
toast.error(`${error}`);
return null;
}
);
});
if (res) {
dispatch('update');
}
}
} catch (error) {
console.log('Error parsing dataTransfer:', error);
}
}
}
}