13dce12665
* create FilterBar componer and its container, unstyled * introduce basic styling for FilterBar * add selection css * allow FilterBar to display active CSS with js * connect the FilterBar to the Redux state * change getNotifications to use filter * remove temporary comments * add an option to turn the FilterBar off in settings * fix showFilterBar data type to boolean * fix eslint errors * add English and Polish translations * allowed filter bar overflow to accomodate for longer languages * fix mispelled translation key * add unified CSS look * replace text in FilterBar with icons * add tooltips * replace text @ with an icon * introduce simple and advanced filtering view * add ability to toggle the advanced view * add Polish translations * change Advanced View description to be more clear * make each filter flush notifications and load new ones, fixing pagination * simplify getNotifications once frontend filtering is not needed for FilterBar * add a semicolon * Revert "simplify getNotifications once frontend filtering is not needed for FilterBar" This reverts commit 9f4be7857135b0327814bd22a3e8a4e7b546f7cc. * reset filter to 'all' when turning off FilterBar
17 lines
576 B
JavaScript
17 lines
576 B
JavaScript
import { connect } from 'react-redux';
|
|
import FilterBar from '../components/filter_bar';
|
|
import { setFilter } from '../../../actions/notifications';
|
|
|
|
const makeMapStateToProps = state => ({
|
|
selectedFilter: state.getIn(['settings', 'notifications', 'quickFilter', 'active']),
|
|
advancedMode: state.getIn(['settings', 'notifications', 'quickFilter', 'advanced']),
|
|
});
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
selectFilter (newActiveFilter) {
|
|
dispatch(setFilter(newActiveFilter));
|
|
},
|
|
});
|
|
|
|
export default connect(makeMapStateToProps, mapDispatchToProps)(FilterBar);
|