mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: fix accounts issue.
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
// @flow
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const currenciesItemsSelector = state => state.currencies.data;
|
||||
|
||||
export const getCurrenciesList = createSelector(
|
||||
currenciesItemsSelector,
|
||||
(currencies) => {
|
||||
return Object.values(currencies);
|
||||
}
|
||||
);
|
||||
|
||||
export const getCurrencyById = (currencies: Object, id: Integer) => {
|
||||
return Object.values(currencies).find(c => c.id == id) || null;
|
||||
|
||||
Reference in New Issue
Block a user