import { FileTextFilled } from '@ant-design/icons'; import { IChatItem } from '../ChatLogsType'; import styles from './index.module.scss'; export const ChatRecord: React.FC = (props) => { function content() { try { const msg = JSON.parse(props.chat?.content as string); return (
{msg.file_name}
); } catch (_e) { return (
{props.chat?.content}
); } } return ( <> {props.from?.user_id == props.chat?.msg_from ? (
{props.from?.name}
{content()}
{props.from?.name[0]}
) : (
{props.to?.cust_info.name}
{content()}
)} ); };