mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
16 lines
444 B
JavaScript
16 lines
444 B
JavaScript
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); |