Files
bigcapital/packages/webapp/src/store/CashflowAccounts/CashflowAccounts.selectors.tsx
2023-02-03 01:02:31 +02:00

21 lines
592 B
TypeScript

// @ts-nocheck
import { paginationLocationQuery } from '@/store/selectors';
import { createDeepEqualSelector } from '@/utils';
// Accounts table state selector
const cashflowAccountsTableStateSelector = (state, props) =>
state.cashflowAccounts.tableState;
// Get accounts table state marged with location query.
export const getCashflowAccountsTableStateFactory = () =>
createDeepEqualSelector(
paginationLocationQuery,
cashflowAccountsTableStateSelector,
(locationQuery, tableState) => {
return {
...locationQuery,
...tableState,
};
},
);