|
|
@@ -3,7 +3,20 @@ import UserPicture from '../User/UserPicture';
|
|
|
|
|
|
export default class UserList extends React.Component {
|
|
|
|
|
|
+ isSeenUserListShown() {
|
|
|
+ const userCount = this.props.users.length;
|
|
|
+ if (0 < userCount && userCount <= 10) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
+ if (!this.isSeenUserListShown()) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
const users = this.props.users.map((user) => {
|
|
|
return (
|
|
|
<a key={user._id} data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
|