mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
11 lines
337 B
JavaScript
11 lines
337 B
JavaScript
import { pickItemsFromIds } from 'store/selectors';
|
|
export const getCustomersItems = (state, viewId) => {
|
|
|
|
const customersView = state.customers.views[viewId || -1];
|
|
const customersItems = state.customers.items;
|
|
|
|
return typeof customersView === 'object'
|
|
? pickItemsFromIds(customersItems, customersView.ids) || []
|
|
: [];
|
|
};
|