cnap-cobre/synapse

View on GitHub
frontend/src/components/UserProfilePhoto/UserProfilePhoto.js

Summary

Maintainability
A
0 mins
Test Coverage
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import React from 'react';
 
 
class UserProfilePhoto extends React.Component {
static propTypes = {
profilePhoto: PropTypes.string.isRequired,
}
 
render = () => (
<img src={this.props.profilePhoto} alt="Profile Photo" />
);
}
 
const mapStateToProps = ({ userProfile }) => ({
profilePhoto: userProfile.gravatar.url,
});
 
export default connect(mapStateToProps)(UserProfilePhoto);