You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
795 B
27 lines
795 B
7 years ago
|
// Package imports.
|
||
8 years ago
|
import { connect } from 'react-redux';
|
||
7 years ago
|
|
||
|
// Our imports.
|
||
7 years ago
|
import { makeGetNotification } from 'flavours/glitch/selectors';
|
||
8 years ago
|
import Notification from '../components/notification';
|
||
7 years ago
|
import { mentionCompose } from 'flavours/glitch/actions/compose';
|
||
8 years ago
|
|
||
|
const makeMapStateToProps = () => {
|
||
|
const getNotification = makeGetNotification();
|
||
|
|
||
|
const mapStateToProps = (state, props) => ({
|
||
|
notification: getNotification(state, props.notification, props.accountId),
|
||
7 years ago
|
notifCleaning: state.getIn(['notifications', 'cleaningMode']),
|
||
8 years ago
|
});
|
||
|
|
||
|
return mapStateToProps;
|
||
|
};
|
||
|
|
||
7 years ago
|
const mapDispatchToProps = dispatch => ({
|
||
|
onMention: (account, router) => {
|
||
|
dispatch(mentionCompose(account, router));
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export default connect(makeMapStateToProps, mapDispatchToProps)(Notification);
|