Render userlist to a div if theres only one user

This commit is contained in:
khlieng 2015-02-22 09:03:03 +01:00
parent cc743a837a
commit 518a530f43

View File

@ -46,13 +46,21 @@ var UserList = React.createClass({
});
}
return (
<div className="userlist" style={style}>
<Infinite containerHeight={this.state.height} elementHeight={24}>
{users}
</Infinite>
</div>
);
if (users.length !== 1) {
return (
<div className="userlist" style={style}>
<Infinite containerHeight={this.state.height} elementHeight={24}>
{users}
</Infinite>
</div>
);
} else {
return (
<div className="userlist" style={style}>
<div>{users}</div>
</div>
);
}
}
});