22 lines
570 B
JavaScript
22 lines
570 B
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import { getProfile } from '../../selectors/profile.js';
|
|
import { matchStateToProps as matchCommonStateProps } from './Profile.stateProps.js';
|
|
import EditProfile from './EditProfile.js';
|
|
|
|
const matchStateToProps = (state) => {
|
|
const commonProps = matchCommonStateProps(state);
|
|
const profile = getProfile(state);
|
|
|
|
return {
|
|
...commonProps,
|
|
firstName: profile.get('firstName'),
|
|
lastName: profile.get('lastName'),
|
|
};
|
|
};
|
|
|
|
export default connect(
|
|
matchStateToProps,
|
|
null,
|
|
)(EditProfile);
|