import { defineMessages, injectIntl } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' import { me } from '../../initial_state' import ModalLayout from './modal_layout' import Avatar from '../avatar' import Button from '../button' import Divider from '../divider' import Image from '../image' import Input from '../input' import Text from '../text' import Textarea from '../textarea' const messages = defineMessages({ edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' }, headerPhoto: { id: 'header_photo', defaultMessage: 'Header photo' }, }) const mapStateToProps = (state) => ({ account: state.getIn(['accounts', me]), }) export default @injectIntl @connect(mapStateToProps) class EditProfileModal extends ImmutablePureComponent { static propTypes = { account: ImmutablePropTypes.map, intl: PropTypes.object.isRequired, onClose: PropTypes.func.isRequired, } render() { const { account, intl, onClose } = this.props const headerSrc = !!account ? account.get('header') : '' return (
{intl.formatMessage(messages.headerPhoto)}