feat: update shared chat

This commit is contained in:
Timothy J. Baek 2024-04-02 07:42:37 -07:00
parent 0b823f90e6
commit 9975cb17a9
3 changed files with 23 additions and 10 deletions

View file

@ -18,13 +18,8 @@
const shareLocalChat = async () => {
const _chat = chat;
let chatShareUrl = '';
if (_chat.share_id) {
chatShareUrl = `${window.location.origin}/s/${_chat.share_id}`;
} else {
const sharedChat = await shareChatById(localStorage.token, $chatId);
chatShareUrl = `${window.location.origin}/s/${sharedChat.id}`;
}
const sharedChat = await shareChatById(localStorage.token, $chatId);
const chatShareUrl = `${window.location.origin}/s/${sharedChat.id}`;
toast.success($i18n.t('Copied shared conversation URL to clipboard!'));
copyToClipboard(chatShareUrl);