Fixed publishing info

This commit is contained in:
Jori Lallo
2016-06-05 16:13:33 -07:00
parent f3dbe530f1
commit 9c0700369d
2 changed files with 3 additions and 3 deletions

View File

@@ -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 }
/> />

View File

@@ -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>
&nbsp;and modified { moment(props.timestamp).fromNow() } &nbsp;and modified { moment(props.updatedAt).fromNow() }
</span> </span>
) : null } ) : null }
</span> </span>