2020-08-28 13:22:33 -07:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import IconWithBadge from 'soapbox/components/icon_with_badge';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2020-10-02 18:01:09 -07:00
|
|
|
count: state.get('chats').reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0),
|
2020-08-28 13:22:33 -07:00
|
|
|
id: 'comment',
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(IconWithBadge);
|