fix: remove duplicate MessageItem #1289 (#1566)

### What problem does this PR solve?

fix: remove duplicate MessageItem #1289

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-17 14:49:11 +08:00
committed by GitHub
parent 1015436691
commit fe5dd5b70a
12 changed files with 73 additions and 408 deletions

View File

@@ -8,6 +8,7 @@ import { Button, Drawer, Flex, Input, Spin } from 'antd';
import { useSelectCurrentMessages, useSendMessage } from './hooks';
import { useSelectUserInfo } from '@/hooks/userSettingHook';
import styles from './index.less';
const FlowChatBox = () => {
@@ -31,6 +32,7 @@ const FlowChatBox = () => {
useClickDrawer();
useGetFileIcon();
const { t } = useTranslate('chat');
const userInfo = useSelectUserInfo();
return (
<>
@@ -47,6 +49,8 @@ const FlowChatBox = () => {
currentMessages.length - 1 === i
}
key={message.id}
nickname={userInfo.nickname}
avatar={userInfo.avatar}
item={message}
reference={buildMessageItemReference(
{ message: currentMessages, reference },