import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { fetchChats } from 'soapbox/actions/chats'; import Account from 'soapbox/components/account'; const mapStateToProps = state => ({ chats: state.get('chats'), }); export default @connect(mapStateToProps) @injectIntl class ChatList extends ImmutablePureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; componentDidMount() { this.props.dispatch(fetchChats()); } render() { const { chats } = this.props; return (