Created
April 19, 2018 14:12
-
-
Save lupomontero/765a9ddf45f87ffc7df375902600c957 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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
const Profile = ({ user = {} }) => ( | |
<div> | |
<h2>{user.name}</h2> | |
<p> | |
<a href={`mailto:${user.email}`}> | |
{user.email} | |
</a> | |
</p> | |
</div> | |
); | |
Profile.propTypes = { | |
user: PropTypes.shape({ | |
name: PropTypes.string.isRequired, | |
email: PropTypes.string.isRequired, | |
}).isRequired, | |
}; | |
export default Profile; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment