Fixed: Series footer shows statistics based on filtered series list

pull/3072/head
Mark McDowall 6 years ago
parent 24fba7a36d
commit 889f92268e

@ -1,10 +1,40 @@
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector';
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
import SeriesIndexFooter from './SeriesIndexFooter';
function createUnoptimizedSelector() {
return createSelector(
createClientSideCollectionSelector('series', 'seriesIndex'),
(series) => {
return series.items.map((s) => {
const {
monitored,
status,
statistics
} = s;
return {
monitored,
status,
statistics
};
});
}
);
}
function createSeriesSelector() {
return createDeepEqualSelector(
createUnoptimizedSelector(),
(series) => series
);
}
function createMapStateToProps() {
return createSelector(
(state) => state.series.items,
createSeriesSelector(),
(series) => {
return {
series

Loading…
Cancel
Save