mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
don’t use FormattedRelative
This commit is contained in:
parent
eebcd9436e
commit
2ed1762e3e
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ import React from 'react';
|
|||
import { FormattedMessage, FormattedRelative } from 'meteor/vulcan:i18n';
|
||||
import { Link } from 'react-router';
|
||||
import Posts from "meteor/vulcan:posts";
|
||||
import moment from 'moment';
|
||||
|
||||
class CustomPostsItem extends getRawComponent('PostsItem') {
|
||||
|
||||
|
@ -39,7 +40,7 @@ class CustomPostsItem extends getRawComponent('PostsItem') {
|
|||
|
||||
<div className="posts-item-meta">
|
||||
{post.user? <div className="posts-item-user"><Components.UsersAvatar user={post.user} size="small"/><Components.UsersName user={post.user}/></div> : null}
|
||||
<div className="posts-item-date"><FormattedRelative value={post.postedAt}/></div>
|
||||
<div className="posts-item-date">{post.postedAt ? moment(new Date(post.postedAt)).fromNow() : <FormattedMessage id="posts.dateNotDefined"/>}</div>
|
||||
<div className="posts-item-comments">
|
||||
<Link to={Posts.getPageUrl(post)}>
|
||||
{!post.commentCount || post.commentCount === 0 ? <FormattedMessage id="comments.count_0"/> :
|
||||
|
@ -56,7 +57,6 @@ class CustomPostsItem extends getRawComponent('PostsItem') {
|
|||
|
||||
{this.renderCommenters()}
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue