You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
752 B

export default function UserCard({ user, onSubmit, doShowControls, control }) {
return (
<div className="glassmorphism flex items-center justify-between p-2">
<div className="flex items-center gap-4">
<img src={user.picture || '/default-profile.png'} alt={`${user.username}'s profile`} className="w-10 h-10 rounded-full mr-2" />
<span className="text-white text-lg font-montserrat font-semibold">{user.username}</span>
</div>
{doShowControls && (
<div className="flex items-center gap-2" onClick={(e) => {
onSubmit(user);
}}>
{control}
</div>
)}
</div>
);
}