Add br instead of hr for last element
This commit is contained in:
parent
70e0329f5a
commit
a9f28e8092
2 changed files with 4 additions and 3 deletions
|
|
@ -66,8 +66,8 @@ class SidebarWidget extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const users = this.state.suggestedUsers.map(user => (
|
||||
<SidebarUser key={user.id} user={user} followUser={this.followUser} />
|
||||
const users = this.state.suggestedUsers.map((user, index) => (
|
||||
<SidebarUser key={user.id} user={user} followUser={this.followUser} index={index} />
|
||||
));
|
||||
return (
|
||||
<div className="widget-suggested-follows-container" id="widget-00001">
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class SidebarUser extends Component {
|
|||
{this.props.user.following ? '✓ FOLLOWING' : '+ FOLLOW'}
|
||||
</button>
|
||||
</div>
|
||||
<hr />
|
||||
{this.props.index === 2 ? <br /> : <hr />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -41,6 +41,7 @@ class SidebarUser extends Component {
|
|||
SidebarUser.propTypes = {
|
||||
followUser: PropTypes.func.isRequired,
|
||||
user: PropTypes.object.isRequired,
|
||||
index: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
export default SidebarUser;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue