import React, { PropsWithChildren, useState } from 'react'; import TencentCloudChat from '@tencentcloud/chat'; import { Model } from '../Model'; import type { MessageContextProps } from './MessageText'; function MessageImageWithContext ( props: PropsWithChildren, ):React.ReactElement { const { context, message, children, } = props; const [show, setShow] = useState(false); const bigImageInfo = message?.payload?.imageInfoArray?.filter((item) => item.type === 0); return (
{ setShow(true); }}>
{children} { show && ( { setShow(false); }}> ) }
); } const MemoizedMessageImage = React.memo(MessageImageWithContext) as typeof MessageImageWithContext; export function MessageImage(props:MessageContextProps):React.ReactElement { return ( ); }