import { durationFormat } from '@/services/utils'; import { IChatItem } from '../ChatLogsType'; export const ChatVoiptext: React.FC = (props) => { const invitetype: any = { '1': '单人视频通话', '2': '单人语音通话', '3': '多人视频通话', '4': '多人语音通话', }; function content() { try { const msg = JSON.parse(props.chat?.content as string); return (
音视频通话 {durationFormat(msg.callduration)}
{invitetype[msg.invitetype]}
); } catch (_e) { return (
{props.chat?.content}
); } } return <>{content()}; };