Reformatted post_header.jsx to meet style guide requirements.
Этот коммит содержится в:
@@ -1,23 +1,42 @@
|
|||||||
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
|
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
|
||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
var UserProfile = require( './user_profile.jsx' );
|
var UserProfile = require('./user_profile.jsx');
|
||||||
var PostInfo = require('./post_info.jsx');
|
var PostInfo = require('./post_info.jsx');
|
||||||
|
|
||||||
module.exports = React.createClass({
|
export default class PostHeader extends React.Component {
|
||||||
getInitialState: function() {
|
constructor(props) {
|
||||||
return { };
|
super(props);
|
||||||
},
|
this.state = {};
|
||||||
render: function() {
|
}
|
||||||
|
render() {
|
||||||
var post = this.props.post;
|
var post = this.props.post;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="post-header post-header-post">
|
<ul className='post-header post-header-post'>
|
||||||
<li className="post-header-col post-header__name"><strong><UserProfile userId={post.user_id} /></strong></li>
|
<li className='post-header-col post-header__name'><strong><UserProfile userId={post.user_id} /></strong></li>
|
||||||
<li className="post-info--hidden">
|
<li className='post-info--hidden'>
|
||||||
<PostInfo post={post} commentCount={this.props.commentCount} handleCommentClick={this.props.handleCommentClick} allowReply="true" isLastComment={this.props.isLastComment} />
|
<PostInfo
|
||||||
|
post={post}
|
||||||
|
commentCount={this.props.commentCount}
|
||||||
|
handleCommentClick={this.props.handleCommentClick}
|
||||||
|
allowReply='true'
|
||||||
|
isLastComment={this.props.isLastComment}
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
PostHeader.defaultProps = {
|
||||||
|
post: null,
|
||||||
|
commentCount: 0,
|
||||||
|
isLastComment: false
|
||||||
|
};
|
||||||
|
PostHeader.propTypes = {
|
||||||
|
post: React.PropTypes.object,
|
||||||
|
commentCount: React.PropTypes.number,
|
||||||
|
isLastComment: React.PropTypes.bool,
|
||||||
|
handleCommentClick: React.PropTypes.func
|
||||||
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user