Created
June 12, 2017 12:04
-
-
Save dvtng/a7daa221c018a3b74dbb61d79340e6e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Comment extends React.Component { | |
render() { | |
const metadata = this.props.publishTime ? | |
<PublishTime time={this.props.publishTime} /> : | |
<span>Saving...</span>; | |
const actions = []; | |
if (this.props.isSignedIn) { | |
actions.push(<LikeAction />); | |
actions.push(<ReplyAction />); | |
} | |
if (this.props.isAuthor) { | |
actions.push(<DeleteAction />); | |
} | |
return <CommentTemplate metadata={metadata} actions={actions} />; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment