Last active
July 24, 2019 12:50
-
-
Save diegohaz/057e640f1a77f4646e865b55f95c5043 to your computer and use it in GitHub Desktop.
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
const Avatar = ({ profile, ...props }) => ( | |
<img | |
className="avatar" | |
src={profile && profile.photoUrl} | |
alt={profile && profile.photoAlt} | |
{...props} | |
/> | |
); | |
Avatar.propTypes = { | |
profile: PropTypes.shape({ | |
photoUrl: PropTypes.string.isRequired, | |
photoAlt: PropTypes.string.isRequired | |
}).isRequired | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment