mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
avoid intl error on date not defined in PostsItem base component (happen on pending view)
This commit is contained in:
parent
475e3cb370
commit
448a6464d7
2 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,7 @@ class PostsItem extends Component {
|
|||
|
||||
<div className="posts-item-meta">
|
||||
{post.user? <div className="posts-item-user"><Telescope.components.UsersAvatar user={post.user} size="small"/><Telescope.components.UsersName user={post.user}/></div> : null}
|
||||
<div className="posts-item-date"><FormattedRelative value={post.postedAt}/></div>
|
||||
<div className="posts-item-date">{post.postedAt ? <FormattedRelative value={post.postedAt}/> : <FormattedMessage id="posts.dateNotDefined"/>}</div>
|
||||
<div className="posts-item-comments">
|
||||
<Link to={Posts.getPageUrl(post)}>
|
||||
<FormattedMessage id="comments.count" values={{count: post.commentCount}}/>
|
||||
|
|
|
@ -30,6 +30,7 @@ Telescope.strings.en = {
|
|||
"posts.created_message": "Post created.",
|
||||
"posts.rate_limit_error": "Please wait {details} seconds before posting again.",
|
||||
"posts.postedAt": "Posted at",
|
||||
"posts.dateNotDefined": "Date not defined",
|
||||
|
||||
"comments.comments": "Comments",
|
||||
"comments.count": "{count, plural, =0 {No comments} one {# comment} other {# comments}}",
|
||||
|
|
Loading…
Add table
Reference in a new issue