summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_time.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post_view/post_time.jsx')
-rw-r--r--webapp/components/post_view/post_time.jsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/webapp/components/post_view/post_time.jsx b/webapp/components/post_view/post_time.jsx
index 133b6b5a3..2619c6807 100644
--- a/webapp/components/post_view/post_time.jsx
+++ b/webapp/components/post_view/post_time.jsx
@@ -13,6 +13,11 @@ export default class PostTime extends React.PureComponent {
static propTypes = {
/*
+ * If true, time will be rendered as a permalink to the post
+ */
+ isPermalink: PropTypes.bool.isRequired,
+
+ /*
* The time to display
*/
eventTime: PropTypes.number.isRequired,
@@ -26,12 +31,12 @@ export default class PostTime extends React.PureComponent {
* The post id of posting being rendered
*/
postId: PropTypes.string
- }
+ };
static defaultProps = {
eventTime: 0,
useMilitaryTime: false
- }
+ };
constructor(props) {
super(props);
@@ -74,7 +79,7 @@ export default class PostTime extends React.PureComponent {
}
render() {
- if (isMobile()) {
+ if (isMobile() || !this.props.isPermalink) {
return this.renderTimeTag();
}