import React from 'react';
import classNames from 'classnames';
import moment from 'moment';
import { Message } from './Message';
import { useDispatch, useSelector } from 'react-redux';
import { Avatar, AvatarSize } from '../../../avatar/Avatar';
import { deleteMessagesById } from '../../../../interactions/conversations/unsendingInteractions';
import {
closeMessageDetailsView,
ContactPropsMessageDetail,
} from '../../../../state/ducks/conversations';
import { getMessageDetailsViewProps } from '../../../../state/selectors/conversations';
import { ContactName } from '../../ContactName';
// tslint:disable-next-line: no-submodule-imports
import useKey from 'react-use/lib/useKey';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../../../basic/SessionButton';
import { useMessageIsDeletable } from '../../../../state/selectors';
const AvatarItem = (props: { pubkey: string }) => {
const { pubkey } = props;
return
{i18n('error')} | {' '} {error.message}{' '} |
{i18n('sent')} | {moment(sentAt).format('LLLL')} ({sentAt}) |
{i18n('received')} | {moment(receivedAt).format('LLLL')} ({receivedAt}) |
{direction === 'incoming' ? i18n('from') : i18n('to')} |