Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed the issue where the conversation list was not displayed on the conversation page #2625 #2638

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/src/assets/svg/plus-circle-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion web/src/hooks/chat-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
16 changes: 9 additions & 7 deletions web/src/pages/chat/index.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -297,7 +293,13 @@ const Chat = () => {
<Tag>{conversationList.length}</Tag>
</Space>
<Tooltip title={t('newChat')}>
<PlusOutlined onClick={handleCreateTemporaryConversation} />
<div>
<SvgIcon
name="plus-circle-fill"
width={20}
onClick={handleCreateTemporaryConversation}
></SvgIcon>
</div>
</Tooltip>
</Flex>
<Divider></Divider>
Expand Down