Fixed publishing info
This commit is contained in:
@@ -27,8 +27,8 @@ class Document extends React.Component {
|
||||
return (
|
||||
<div className={ styles.container }>
|
||||
<PublishingInfo
|
||||
document={ this.props.document }
|
||||
name={ this.props.document.user.name }
|
||||
avatarUrl={ this.props.document.user.avatarUrl }
|
||||
createdAt={ this.props.document.createdAt }
|
||||
updatedAt={ this.props.document.updatedAt }
|
||||
/>
|
||||
|
||||
@@ -11,10 +11,10 @@ const PublishingInfo = (props) => {
|
||||
<Flex align="center" className={ styles.user }>
|
||||
<Avatar src={ props.avatarUrl } size={ 24 } />
|
||||
<span className={ styles.userName }>
|
||||
{ props.name } published { moment(props.timestamp).fromNow() }
|
||||
{ props.name } published { moment(props.createdAt).fromNow() }
|
||||
{ props.createdAt !== props.updatedAt ? (
|
||||
<span>
|
||||
and modified { moment(props.timestamp).fromNow() }
|
||||
and modified { moment(props.updatedAt).fromNow() }
|
||||
</span>
|
||||
) : null }
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user