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.
Prowlarr/frontend/src/Indexer/Index/Table/IndexerIndexTableConnector.js

30 lines
825 B

import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { setMovieSort } from 'Store/Actions/indexerIndexActions';
import IndexerIndexTable from './IndexerIndexTable';
function createMapStateToProps() {
return createSelector(
(state) => state.app.dimensions,
(state) => state.indexerIndex.tableOptions,
(state) => state.indexerIndex.columns,
(dimensions, tableOptions, columns) => {
return {
isSmallScreen: dimensions.isSmallScreen,
showBanners: tableOptions.showBanners,
columns
};
}
);
}
function createMapDispatchToProps(dispatch, props) {
return {
onSortPress(sortKey) {
dispatch(setMovieSort({ sortKey }));
}
};
}
export default connect(createMapStateToProps, createMapDispatchToProps)(IndexerIndexTable);