aboutsummaryrefslogtreecommitdiff
path: root/src/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/js')
-rw-r--r--src/web/js/components/MiddlePanel.react.js8
-rw-r--r--src/web/js/components/RightPanel.react.js4
-rw-r--r--src/web/js/components/time.react.js6
3 files changed, 7 insertions, 11 deletions
diff --git a/src/web/js/components/MiddlePanel.react.js b/src/web/js/components/MiddlePanel.react.js
index f6e44777..2a8ab96e 100644
--- a/src/web/js/components/MiddlePanel.react.js
+++ b/src/web/js/components/MiddlePanel.react.js
@@ -16,7 +16,7 @@ var TableLine = React.createClass({
feed_title: React.PropTypes.string.isRequired,
icon_url: React.PropTypes.string,
title: React.PropTypes.string.isRequired,
- timestamp: React.PropTypes.number.isRequired,
+ rel_date: React.PropTypes.string.isRequired,
date: React.PropTypes.string.isRequired,
read: React.PropTypes.bool.isRequired,
selected: React.PropTypes.bool.isRequired,
@@ -48,12 +48,10 @@ var TableLine = React.createClass({
if(this.props.selected) {
clsses += " active";
}
- // FIXME https://github.com/yahoo/react-intl/issues/189
- // use FormattedRelative when fixed, will have to upgrade to ReactIntlv2
return (<div className={clsses} onClick={this.loadArticle} title={this.props.title}>
<h5><strong>{title}</strong></h5>
<JarrTime text={this.props.date}
- stamp={this.props.timestamp} />
+ stamp={this.props.rel_date} />
<div>{read} {liked} {this.props.title}</div>
</div>
);
@@ -238,7 +236,7 @@ var MiddlePanel = React.createClass({
icon_url={article.icon_url}
read={article.read}
liked={article.liked}
- timestamp={article.timestamp}
+ rel_date={article.rel_date}
date={article.date}
selected={article.selected}
article_id={article.article_id}
diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js
index 97a7c461..6322144f 100644
--- a/src/web/js/components/RightPanel.react.js
+++ b/src/web/js/components/RightPanel.react.js
@@ -310,11 +310,11 @@ var Feed = React.createClass({
return (<div className="panel-body">
<dl className="dl-horizontal">
<dt>Created on</dt>
- <dd><JarrTime stamp={this.props.obj.created_stamp}
+ <dd><JarrTime stamp={this.props.obj.created_rel}
text={this.props.obj.created_date} />
</dd>
<dt>Last fetched</dt>
- <dd><JarrTime stamp={this.props.obj.last_stamp}
+ <dd><JarrTime stamp={this.props.obj.last_rel}
text={this.props.obj.last_retrieved} />
</dd>
</dl>
diff --git a/src/web/js/components/time.react.js b/src/web/js/components/time.react.js
index 8b4d47d9..c293e638 100644
--- a/src/web/js/components/time.react.js
+++ b/src/web/js/components/time.react.js
@@ -1,13 +1,11 @@
var React = require('react');
-var ReactIntl = require('react-intl');
var JarrTime = React.createClass({
- mixins: [ReactIntl.IntlMixin],
- propTypes: {stamp: React.PropTypes.number.isRequired,
+ propTypes: {stamp: React.PropTypes.string.isRequired,
text: React.PropTypes.string.isRequired},
render: function() {
return (<time dateTime={this.props.text} title={this.props.text}>
- {this.formatRelative(this.props.stamp)}
+ {this.props.stamp}
</time>);
},
});
bgstack15