import React from 'react'; import type { SendbirdUserMessage } from '@sendbird/uikit-utils'; import { urlRegexStrict } from '@sendbird/uikit-utils'; import Box from '../../components/Box'; import PressBox from '../../components/PressBox'; import RegexText from '../../components/RegexText'; import Text from '../../components/Text'; import useUIKitTheme from '../../theme/useUIKitTheme'; import MessageContainer from './MessageContainer'; import type { OpenChannelMessageProps } from './index'; type Props = {}; const UserMessage = (props: OpenChannelMessageProps) => { const { colors } = useUIKitTheme(); const { onPress, onLongPress, onPressURL, ...rest } = props; const color = colors.ui.openChannelMessage.default; return ( {({ pressed }) => ( onPressURL?.(match)} onLongPress={onLongPress} color={colors.primary} style={parentProps?.style} > {match} ); }, }, ]} > {props.message.message} {Boolean(props.message.updatedAt) && ( {props.strings?.edited ?? ' (edited)'} )} )} ); }; export default UserMessage;