From cf7a05f80f68b5b1c8bcc0089679dd497cec2506 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Sun, 14 Jun 2015 23:53:32 -0800 Subject: first commit --- web/react/components/post_info.jsx | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 web/react/components/post_info.jsx (limited to 'web/react/components/post_info.jsx') diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx new file mode 100644 index 000000000..cf01747f0 --- /dev/null +++ b/web/react/components/post_info.jsx @@ -0,0 +1,52 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +var UserStore = require('../stores/user_store.jsx'); +var utils = require('../utils/utils.jsx'); + +module.exports = React.createClass({ + getInitialState: function() { + return { }; + }, + render: function() { + var post = this.props.post; + var isOwner = UserStore.getCurrentId() == post.user_id; + + var type = "Post" + if (post.root_id.length > 0) { + type = "Comment" + } + + var comments = ""; + var lastCommentClass = this.props.isLastComment ? " comment-icon__container__show" : " comment-icon__container__hide"; + if (this.props.commentCount >= 1) { + comments = "}} />{this.props.commentCount}; + } + + return ( + + ); + } +}); -- cgit v1.2.3-1-g7c22