Missing classes

This commit is contained in:
Belen Curcio
2017-10-17 15:18:53 -03:00
parent 8633a0f457
commit 2c757e9d57
3 changed files with 16 additions and 13 deletions
@@ -71,24 +71,23 @@ class ProfileContainer extends Component {
const emailAddress = localProfile && localProfile.id;
return (
<div className={cn('talk-my-profile-comment-history', {
'talk-my-profile-comment-history-no-comments': !me.comments.nodes.length
})}>
<div className="talk-my-profile">
<h2>{user.username}</h2>
{emailAddress ? <p>{emailAddress}</p> : null}
{emailAddress && <p>{emailAddress}</p>}
<Slot
fill="profileSections"
data={data}
queryData={{root}}
/>
<hr />
<h3>{t('framework.my_comments')}</h3>
{me.comments.nodes.length
? <CommentHistory data={data} root={root} comments={me.comments} link={link} loadMore={this.loadMore}/>
: <p className='talk-my-profile-comment-history-no-comments-cta'>{t('user_no_comment')}</p>}
<div className={cn('talk-my-profile-comment-history', {
'talk-my-profile-comment-history-no-comments': !me.comments.nodes.length
})}>
{me.comments.nodes.length
? <CommentHistory data={data} root={root} comments={me.comments} link={link} loadMore={this.loadMore}/>
: <p className='talk-my-profile-comment-history-no-comments-cta'>{t('user_no_comment')}</p>}
</div>
</div>
);
}
+7 -3
View File
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Comment from './Comment';
import styles from './CommentHistory.css';
import LoadMore from './LoadMore';
import {forEachError} from 'plugin-api/beta/client/utils';
@@ -25,7 +24,7 @@ class CommentHistory extends React.Component {
render() {
const {link, comments, data, root} = this.props;
return (
<div className={`${styles.header} commentHistory`}>
<div>
<div className="commentHistory__list">
{comments.nodes.map((comment, i) => {
return <Comment
@@ -49,7 +48,12 @@ class CommentHistory extends React.Component {
}
CommentHistory.propTypes = {
comments: PropTypes.object.isRequired
comments: PropTypes.object.isRequired,
loadMore: PropTypes.func,
notify: PropTypes.func,
link: PropTypes.func,
data: PropTypes.object,
root: PropTypes.object
};
export default CommentHistory;