Fix bug: Removed "moment" usage
Also remove the timestamp from the UI, not needed when dealing with live chat (in session). Note: still gonna keep the timestamp in messages data, might use it to display chat summary when call ends.
This commit is contained in:
parent
ecb2132c36
commit
6fba9c876b
@ -43,7 +43,6 @@
|
|||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"config": "^1.26.1",
|
"config": "^1.26.1",
|
||||||
"express": "^4.13.3",
|
"express": "^4.13.3",
|
||||||
"moment": "^2.22.2",
|
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"pug": "^2.0.0-rc.2",
|
"pug": "^2.0.0-rc.2",
|
||||||
"react": "^15.5.4",
|
"react": "^15.5.4",
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import moment from 'moment'
|
|
||||||
|
|
||||||
export const MessagePropTypes = PropTypes.shape({
|
export const MessagePropTypes = PropTypes.shape({
|
||||||
userId: PropTypes.string.isRequired,
|
userId: PropTypes.string.isRequired,
|
||||||
@ -89,11 +88,6 @@ export default class Chat extends React.PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="chat-item-details">
|
|
||||||
<div className="chat-item-date">
|
|
||||||
{moment(message.timestamp).fromNow()}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="chat-item-content">
|
<div className="chat-item-content">
|
||||||
{message.message}
|
{message.message}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -110,19 +110,6 @@
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-item-details {
|
|
||||||
float: right;
|
|
||||||
text-align: right;
|
|
||||||
min-width: 30px;
|
|
||||||
min-height: 30px;
|
|
||||||
padding: 0 0 0 10px;
|
|
||||||
|
|
||||||
.chat-item-date {
|
|
||||||
color: #888;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-item-content {
|
.chat-item-content {
|
||||||
color: #363636;
|
color: #363636;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@ -4775,11 +4775,6 @@ module-deps@^6.0.0:
|
|||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
|
|
||||||
moment@^2.22.2:
|
|
||||||
version "2.22.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
|
|
||||||
integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=
|
|
||||||
|
|
||||||
ms@2.0.0:
|
ms@2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user