summaryrefslogtreecommitdiffstats
path: root/webapp/components/time_since.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-06-15 08:13:17 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-06-15 08:13:17 -0400
commitba77aefe02159325752cfa79210f5e4b5fcef77e (patch)
tree48d41a615a07e6867a36baaa78d227a87e422348 /webapp/components/time_since.jsx
parent3f4d38f58ae086c6570bea7082f25cbdbc52c85d (diff)
downloadchat-ba77aefe02159325752cfa79210f5e4b5fcef77e.tar.gz
chat-ba77aefe02159325752cfa79210f5e4b5fcef77e.tar.bz2
chat-ba77aefe02159325752cfa79210f5e4b5fcef77e.zip
PLT-3202 Re-render timestamps when display settings switch between 12h and 24h (#3337)
* Made post timestamp switch from 12h to 24h without refreshing * Made RHS post timestamps switch from 12h to 24h without refreshing
Diffstat (limited to 'webapp/components/time_since.jsx')
-rw-r--r--webapp/components/time_since.jsx42
1 files changed, 0 insertions, 42 deletions
diff --git a/webapp/components/time_since.jsx b/webapp/components/time_since.jsx
deleted file mode 100644
index 2fbf73e31..000000000
--- a/webapp/components/time_since.jsx
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import Constants from 'utils/constants.jsx';
-import * as Utils from 'utils/utils.jsx';
-
-import React from 'react';
-import PureRenderMixin from 'react-addons-pure-render-mixin';
-
-export default class TimeSince extends React.Component {
- constructor(props) {
- super(props);
-
- this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
- }
- componentDidMount() {
- this.intervalId = setInterval(() => {
- this.forceUpdate();
- }, Constants.TIME_SINCE_UPDATE_INTERVAL);
- }
- componentWillUnmount() {
- clearInterval(this.intervalId);
- }
- render() {
- return (
- <time className='post__time'>
- {Utils.displayTimeFormatted(this.props.eventTime)}
- </time>
- );
- }
-}
-
-TimeSince.defaultProps = {
- eventTime: 0,
- sameUser: false
-};
-
-TimeSince.propTypes = {
- eventTime: React.PropTypes.number.isRequired,
- sameUser: React.PropTypes.bool,
- compactDisplay: React.PropTypes.bool
-};