Make suggestions box also use user list components

This commit is contained in:
Eugen Rochko
2016-10-28 20:26:49 +02:00
parent ac4f53a3a2
commit bfb6cc5f2c
5 changed files with 21 additions and 58 deletions

View File

@ -38,6 +38,12 @@ const Account = React.createClass({
withNote: React.PropTypes.bool
},
getDefaultProps () {
return {
withNote: true
};
},
mixins: [PureRenderMixin],
handleFollow () {
@ -45,7 +51,7 @@ const Account = React.createClass({
},
render () {
const { account, me } = this.props;
const { account, me, withNote } = this.props;
if (!account) {
return <div />;
@ -53,7 +59,7 @@ const Account = React.createClass({
let note, buttons;
if (account.get('note').length > 0) {
if (account.get('note').length > 0 && withNote) {
note = <div style={noteStyle}>{account.get('note')}</div>;
}