Fix : Preferences

This commit is contained in:
elforjani3
2020-11-02 10:23:01 +02:00
parent f76abb3f79
commit e36a1dcf50
20 changed files with 853 additions and 549 deletions

View File

@@ -1,16 +0,0 @@
import { connect } from 'react-redux';
import {
getCurrencyById,
getCurrencyByCode,
} from 'store/currencies/currencies.selector';
const mapStateToProps = (state, props) => ({
...(props.currencyId) ? {
currency: getCurrencyById(state.currencies.data, props.currencyId),
} : (props.currencyCode) ? {
currency: getCurrencyByCode(state.currencies.data, props.currencyCode),
} : {},
});
export default connect(mapStateToProps);

View File

@@ -0,0 +1,12 @@
import { connect } from 'react-redux';
import {
getCurrencyById,
getCurrencyByCode,
} from 'store/currencies/currencies.selector';
const mapStateToProps = (state, props) => ({
currency: getCurrencyByCode(state, props),
});
export default connect(mapStateToProps);