|
|
|
@ -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
|
|
|
|
|