bigbuffet-rw/app/soapbox/features/ui/components/chats_counter_icon.js
2020-08-28 15:22:33 -05:00

9 lines
298 B
JavaScript

import { connect } from 'react-redux';
import IconWithBadge from 'soapbox/components/icon_with_badge';
const mapStateToProps = state => ({
count: state.get('chats').reduce((acc, curr) => acc + curr.get('unread'), 0),
id: 'comment',
});
export default connect(mapStateToProps)(IconWithBadge);