mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix(exchangeRate): fix pagination & add sorting.
This commit is contained in:
@@ -1,24 +1,12 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
getExchangeRatesList,
|
||||
getExchangeRatePaginationMetaFactory,
|
||||
getExchangeRatesTableQueryFactory,
|
||||
} from 'store/ExchangeRate/exchange.selector';
|
||||
import { getExchangeRatesTableStateFactory } from 'store/ExchangeRate/exchange.selector';
|
||||
|
||||
export default (mapState) => {
|
||||
const getExchangeRatesPaginationMeta = getExchangeRatePaginationMetaFactory();
|
||||
|
||||
const getExchangeRatesTableState = getExchangeRatesTableStateFactory();
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
const query = getExchangeRatesTableQueryFactory(state, props);
|
||||
|
||||
const mapped = {
|
||||
exchangeRatesList: getExchangeRatesList(state, props),
|
||||
exchangeRatesLoading: state.exchangeRates.loading,
|
||||
exchangeRatesPageination: getExchangeRatesPaginationMeta(
|
||||
state,
|
||||
props,
|
||||
query,
|
||||
),
|
||||
exchangeRatesTableState: getExchangeRatesTableState(state, props),
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user