2025-02-01 02:04:49 +08:00
|
|
|
import type { BusterChatMessageRequest } from '@/api/asset_interfaces';
|
2025-01-28 08:08:52 +08:00
|
|
|
import { createStyles } from 'antd-style';
|
|
|
|
import React from 'react';
|
2025-02-20 11:05:30 +08:00
|
|
|
import { Text } from '@/components/ui';
|
2025-01-28 08:08:52 +08:00
|
|
|
import { MessageContainer } from './MessageContainer';
|
|
|
|
|
|
|
|
export const ChatUserMessage: React.FC<{ requestMessage: BusterChatMessageRequest }> = React.memo(
|
|
|
|
({ requestMessage }) => {
|
2025-02-05 03:26:42 +08:00
|
|
|
if (!requestMessage) return null;
|
|
|
|
|
2025-01-28 08:08:52 +08:00
|
|
|
const { sender_avatar, sender_id, sender_name, request } = requestMessage;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<MessageContainer senderName={sender_name} senderId={sender_id} senderAvatar={sender_avatar}>
|
2025-01-29 01:57:26 +08:00
|
|
|
<Text className="" lineHeight={undefined}>
|
2025-01-28 08:08:52 +08:00
|
|
|
{request}
|
|
|
|
</Text>
|
|
|
|
</MessageContainer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
ChatUserMessage.displayName = 'ChatUserMessage';
|
|
|
|
|
|
|
|
const useStyles = createStyles(({ token, css }) => ({}));
|