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