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.
35 lines
925 B
35 lines
925 B
import { createSelector } from 'reselect';
|
|
import connectSection from 'Store/connectSection';
|
|
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
|
|
import { setArtistSort } from 'Store/Actions/artistIndexActions';
|
|
import ArtistIndexTable from './ArtistIndexTable';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
(state) => state.app.dimensions,
|
|
createClientSideCollectionSelector(),
|
|
(dimensions, series) => {
|
|
return {
|
|
isSmallScreen: dimensions.isSmallScreen,
|
|
...series
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
return {
|
|
onSortPress(sortKey) {
|
|
dispatch(setArtistSort({ sortKey }));
|
|
}
|
|
};
|
|
}
|
|
|
|
export default connectSection(
|
|
createMapStateToProps,
|
|
createMapDispatchToProps,
|
|
undefined,
|
|
{ withRef: true },
|
|
{ section: 'series', uiSection: 'artistIndex' }
|
|
)(ArtistIndexTable);
|