soapbox/app/soapbox/features/ui/components/chats_counter_icon.js

10 wiersze
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);