import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' import { injectIntl, defineMessages } from 'react-intl' import { me } from '../initial_state' import { BREAKPOINT_EXTRA_SMALL } from '../constants' import ComposeFormContainer from '../features/compose/containers/compose_form_container' import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component' import Responsive from '../features/ui/util/responsive_component' import Avatar from './avatar' import Heading from './heading' class TimelineComposeBlock extends ImmutablePureComponent { render() { const { account, size, intl, modal, ...rest } = this.props if (modal) { return (
) } return (
{intl.formatMessage(messages.createPost)}
) } } const messages = defineMessages({ createPost: { id: 'column_header.create_post', defaultMessage: 'Create Post' }, }) const mapStateToProps = (state) => ({ account: state.getIn(['accounts', me]), }) TimelineComposeBlock.propTypes = { intl: PropTypes.object.isRequired, account: ImmutablePropTypes.map.isRequired, size: PropTypes.number, modal: PropTypes.bool, } TimelineComposeBlock.defaultProps = { size: 32, } export default injectIntl(connect(mapStateToProps)(TimelineComposeBlock))