1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

[improve] comment style (#2864)

This commit is contained in:
Michael An
2019-01-22 13:54:08 +08:00
committed by Daniel Pan
parent 963c4f94b5
commit ccc51fa1e4
2 changed files with 4 additions and 23 deletions

View File

@@ -22,7 +22,6 @@ class ReviewComments extends React.Component {
super(props);
this.state = {
commentsList: [],
userAvatar: '',
inResizing: false,
commentFooterHeight: 30,
showResolvedComment: true,
@@ -48,15 +47,6 @@ class ReviewComments extends React.Component {
});
}
getUserAvatar = () => {
seafileAPI.getAccountInfo().then((res) => {
this.accountInfo = res.data;
this.setState({
userAvatar: res.data.avatar_url,
});
});
}
handleCommentChange = (event) => {
this.setState({
comment: event.target.value,
@@ -140,7 +130,6 @@ class ReviewComments extends React.Component {
}
componentWillMount() {
this.getUserAvatar();
this.listComments();
}
@@ -193,9 +182,6 @@ class ReviewComments extends React.Component {
</div>
<div className="seafile-comment-footer" style={{height:this.state.commentFooterHeight+'%'}}>
<div className="seafile-comment-row-resize" onMouseDown={this.onResizeMouseDown}></div>
<div className="user-header">
<img className="avatar" src={this.state.userAvatar} alt="avatar"/>
</div>
<div className="seafile-add-comment">
<textarea className="add-comment-input" value={this.state.comment}
placeholder={gettext('Add a comment.')} onChange={this.handleCommentChange}