2019-05-23 08:35:22 +09:00
|
|
|
import { connect } from 'react-redux';
|
2019-05-26 09:55:37 +09:00
|
|
|
import IconWithBadge from 'mastodon/components/icon_with_badge';
|
2019-05-23 08:35:22 +09:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
count: state.getIn(['notifications', 'unread']),
|
2020-10-13 07:37:21 +09:00
|
|
|
issueBadge: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) !== 'granted',
|
2019-05-26 09:55:37 +09:00
|
|
|
id: 'bell',
|
2019-05-23 08:35:22 +09:00
|
|
|
});
|
|
|
|
|
2019-05-26 09:55:37 +09:00
|
|
|
export default connect(mapStateToProps)(IconWithBadge);
|