import { connect } from 'react-redux';

import {
    getProfileAvatarUrl,
    getUserInitials,
    isRegisteredAccount,
} from '../../../selectors/profile.js';

import UserProfileButton from './UserProfileButton.js';

const matchStateToProps = (state) => ({
    avatarUrl: getProfileAvatarUrl(state),
    initials: getUserInitials(state),
    isRegisteredAccount: isRegisteredAccount(state),
});

export default connect(
    matchStateToProps,
    null,
)(UserProfileButton);
