Files
bigcapital/client/src/containers/ExchangeRates/withExchangeRates.js
2021-03-08 16:17:13 +02:00

16 lines
492 B
JavaScript

import { connect } from 'react-redux';
import { getExchangeRatesTableStateFactory } from 'store/ExchangeRate/exchange.selector';
export default (mapState) => {
const getExchangeRatesTableState = getExchangeRatesTableStateFactory();
const mapStateToProps = (state, props) => {
const mapped = {
exchangeRatesTableState: getExchangeRatesTableState(state, props),
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};