import { RedEnvelopeFilled } from '@ant-design/icons'; import { IChatItem } from '../ChatLogsType'; export const ChatRedpacket: React.FC = (props) => { const type: any = { 1: '普通红包', 2: '拼手气群红包', 3: '激励群红包', }; function content() { try { const msg = JSON.parse(props.chat?.content as string); return (
{msg.wish}
{msg.totalcnt}个,{(msg.totalamount / 100).toFixed(2)}元
{type[msg.type]}
); } catch (_e) { return (
{props.chat?.content}
红包
); } } return <>{content()}; };