Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created November 13, 2021 16:13
Show Gist options
  • Save hieptl/78b36d7fe88e3b09c71f04b5eb21ec28 to your computer and use it in GitHub Desktop.
Save hieptl/78b36d7fe88e3b09c71f04b5eb21ec28 to your computer and use it in GitHub Desktop.
Users.js - Discord Clone
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