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.
Lidarr/frontend/src/Artist/Index/Table/ArtistIndexTableConnector.js

30 lines
892 B

import { connect } from 'react-redux';
import { createSelector } from 'reselect';
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('artist', 'artistIndex'),
7 years ago
(dimensions, artist) => {
return {
isSmallScreen: dimensions.isSmallScreen,
...artist,
showBanners: artist.tableOptions.showBanners
};
}
);
}
function createMapDispatchToProps(dispatch, props) {
return {
onSortPress(sortKey) {
dispatch(setArtistSort({ sortKey }));
}
};
}
export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistIndexTable);