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:
Michael H. Arieli 2018-11-25 07:57:29 -08:00
parent ecb2132c36
commit 6fba9c876b
4 changed files with 0 additions and 25 deletions

View File

@ -43,7 +43,6 @@
"classnames": "^2.2.5",
"config": "^1.26.1",
"express": "^4.13.3",
"moment": "^2.22.2",
"prop-types": "^15.5.10",
"pug": "^2.0.0-rc.2",
"react": "^15.5.4",

View File

@ -1,6 +1,5 @@
import PropTypes from 'prop-types'
import React from 'react'
import moment from 'moment'
export const MessagePropTypes = PropTypes.shape({
userId: PropTypes.string.isRequired,
@ -89,11 +88,6 @@ export default class Chat extends React.PureComponent {
</div>
)}
</div>
<div className="chat-item-details">
<div className="chat-item-date">
{moment(message.timestamp).fromNow()}
</div>
</div>
<div className="chat-item-content">
{message.message}
</div>

View File

@ -110,19 +110,6 @@
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 {
color: #363636;
font-size: 13px;

View File

@ -4775,11 +4775,6 @@ module-deps@^6.0.0:
through2 "^2.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:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"