11/* eslint react/no-array-index-key: "off" */
22
3- import { Constants } from 'botframework-webchat-core' ;
43import { css } from 'glamor' ;
54import classNames from 'classnames' ;
65import PropTypes from 'prop-types' ;
@@ -13,18 +12,13 @@ import connectToWebChat from '../connectToWebChat';
1312import ScreenReaderText from '../ScreenReaderText' ;
1413import SendStatus from './SendStatus' ;
1514import textFormatToContentType from '../Utils/textFormatToContentType' ;
16- import Timestamp from './Timestamp' ;
1715import useAvatarForBot from '../hooks/useAvatarForBot' ;
1816import useAvatarForUser from '../hooks/useAvatarForUser' ;
1917import useLocalize from '../hooks/useLocalize' ;
2018import useLocalizeDate from '../hooks/useLocalizeDate' ;
2119import useStyleOptions from '../hooks/useStyleOptions' ;
2220import useStyleSet from '../hooks/useStyleSet' ;
2321
24- const {
25- ActivityClientState : { SENDING , SEND_FAILED }
26- } = Constants ;
27-
2822const ROOT_CSS = css ( {
2923 display : 'flex' ,
3024
@@ -93,7 +87,7 @@ const StackedLayout = ({ activity, children, timestampClassName }) => {
9387
9488 const {
9589 attachments = [ ] ,
96- channelData : { messageBack : { displayText : messageBackDisplayText } = { } , state } = { } ,
90+ channelData : { messageBack : { displayText : messageBackDisplayText } = { } } = { } ,
9791 from : { role } = { } ,
9892 text,
9993 textFormat,
@@ -103,7 +97,6 @@ const StackedLayout = ({ activity, children, timestampClassName }) => {
10397 const activityDisplayText = messageBackDisplayText || text ;
10498 const fromUser = role === 'user' ;
10599 const initials = fromUser ? userInitials : botInitials ;
106- const showSendStatus = state === SENDING || state === SEND_FAILED ;
107100 const plainText = remarkStripMarkdown ( text ) ;
108101 const indented = fromUser ? bubbleFromUserNubSize : bubbleNubSize ;
109102
@@ -161,11 +154,7 @@ const StackedLayout = ({ activity, children, timestampClassName }) => {
161154 </ div >
162155 ) ) }
163156 < div className = { classNames ( 'webchat__row' , { webchat__stacked_item_indented : indented } ) } >
164- { showSendStatus ? (
165- < SendStatus activity = { activity } className = "timestamp" />
166- ) : (
167- < Timestamp activity = { activity } aria-hidden = { true } className = { classNames ( 'timestamp' , timestampClassName ) } />
168- ) }
157+ < SendStatus activity = { activity } className = "timestamp" timestampClassName = { timestampClassName } />
169158 < div className = "filler" />
170159 </ div >
171160 </ div >
0 commit comments