From f7b98e8c84fd43d734e53cb8da5b0bd681919fdf Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 10 Nov 2024 16:39:11 -0800 Subject: [PATCH] refac --- .../layout/Sidebar/ArchivedChatsModal.svelte | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte b/src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte index 3ccc97f6e..260c99cf8 100644 --- a/src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte +++ b/src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte @@ -7,24 +7,24 @@ const dispatch = createEventDispatcher(); - import Modal from '$lib/components/common/Modal.svelte'; import { archiveChatById, deleteChatById, getAllArchivedChats, getArchivedChatList } from '$lib/apis/chats'; + + import Modal from '$lib/components/common/Modal.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte'; - import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte'; + import UnarchiveAllConfirmDialog from '$lib/components/common/ConfirmDialog.svelte'; const i18n = getContext('i18n'); export let show = false; - let searchValue = ''; - let chats = []; - let unarchiveAllDialogShow = false; + let searchValue = ''; + let showUnarchiveAllConfirmDialog = false; const unarchiveChatHandler = async (chatId) => { const res = await archiveChatById(localStorage.token, chatId).catch((error) => { @@ -65,6 +65,15 @@ } + { + unarchiveAllHandler(); + }} +/> +
@@ -212,25 +221,16 @@
-
+
- { - unarchiveAllHandler(); - }} - /> -