mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
WIP optimize connect with redux state in preferences pages.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
export const getCurrencyById = (items, id) => {
|
||||
return items[id] || null;
|
||||
// @flow
|
||||
|
||||
export const getCurrencyById = (currencies: Object, id: Integer) => {
|
||||
return Object.values(currencies).find(c => c.id == id) || null;
|
||||
};
|
||||
|
||||
export const getCurrencyByCode = (currencies: Object, currencyCode: String) => {
|
||||
return currencies[currencyCode] || null;
|
||||
};
|
||||
Reference in New Issue
Block a user