24 lines
635 B
JavaScript
24 lines
635 B
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import { getProfile } from '../../selectors/profile.js';
|
|
import { commonProfileStateToProps } from './Profile.container.js';
|
|
import { isRegisteredAccount } from '../../selectors/profile.js';
|
|
|
|
import ViewProfile from './ViewProfile.js';
|
|
|
|
const matchStateToProps = (state) => {
|
|
const commonProps = commonProfileStateToProps(state);
|
|
const profile = getProfile(state);
|
|
|
|
return {
|
|
...commonProps,
|
|
fullName: profile.get('fullName'),
|
|
isRegisteredAccount: isRegisteredAccount(state),
|
|
};
|
|
};
|
|
|
|
export default connect(
|
|
matchStateToProps,
|
|
null,
|
|
)(ViewProfile);
|