Created
November 13, 2021 16:13
-
-
Save hieptl/78b36d7fe88e3b09c71f04b5eb21ec28 to your computer and use it in GitHub Desktop.
Users.js - Discord Clone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import User from './User'; | |
const Users = (props) => { | |
const { users, onConfirmShown } = props; | |
if (!users || !users.length) { | |
return <></>; | |
} | |
return ( | |
<div className="add-friend__list"> | |
{users.map(user => <User key={user.id} user={user} onItemClicked={onConfirmShown} />)} | |
</div> | |
); | |
}; | |
export default Users; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment