From ff9c11c970dbb92befeedd7b1d40572c65c47f26 Mon Sep 17 00:00:00 2001 From: balibabu Date: Sun, 29 Sep 2024 09:43:23 +0800 Subject: [PATCH] fix: Fixed the issue where the conversation list was not displayed on the conversation page #2625 (#2638) ### What problem does this PR solve? fix: Fixed the issue where the conversation list was not displayed on the conversation page #2625 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/assets/svg/plus-circle-fill.svg | 6 ++++++ web/src/hooks/chat-hooks.ts | 1 - web/src/pages/chat/index.tsx | 16 +++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 web/src/assets/svg/plus-circle-fill.svg diff --git a/web/src/assets/svg/plus-circle-fill.svg b/web/src/assets/svg/plus-circle-fill.svg new file mode 100644 index 000000000..b0fc908a5 --- /dev/null +++ b/web/src/assets/svg/plus-circle-fill.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/web/src/hooks/chat-hooks.ts b/web/src/hooks/chat-hooks.ts index 49b1e2166..f9e89066a 100644 --- a/web/src/hooks/chat-hooks.ts +++ b/web/src/hooks/chat-hooks.ts @@ -95,7 +95,6 @@ export const useFetchNextDialogList = () => { initialData: [], gcTime: 0, refetchOnWindowFocus: false, - refetchOnMount: false, queryFn: async (...params) => { console.log('🚀 ~ queryFn: ~ params:', params); const { data } = await chatService.listDialog(); diff --git a/web/src/pages/chat/index.tsx b/web/src/pages/chat/index.tsx index 5bd5d973a..3a87a8395 100644 --- a/web/src/pages/chat/index.tsx +++ b/web/src/pages/chat/index.tsx @@ -1,11 +1,6 @@ import { ReactComponent as ChatAppCube } from '@/assets/svg/chat-app-cube.svg'; import RenameModal from '@/components/rename-modal'; -import { - CloudOutlined, - DeleteOutlined, - EditOutlined, - PlusOutlined, -} from '@ant-design/icons'; +import { CloudOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons'; import { Avatar, Button, @@ -35,6 +30,7 @@ import { } from './hooks'; import ChatOverviewModal from '@/components/api-service/chat-overview-modal'; +import SvgIcon from '@/components/svg-icon'; import { useClickConversationCard, useClickDialogCard, @@ -297,7 +293,13 @@ const Chat = () => { {conversationList.length} - +
+ +