Files
bigcapital/packages/webapp/src/containers/Accounts/withAccounts.tsx
2023-02-03 01:02:31 +02:00

22 lines
664 B
TypeScript

// @ts-nocheck
import { connect } from 'react-redux';
import {
getAccountsTableStateFactory,
accountsTableStateChangedFactory,
} from '@/store/accounts/accounts.selectors';
export default (mapState) => {
const getAccountsTableState = getAccountsTableStateFactory();
const accountsTableStateChanged = accountsTableStateChangedFactory();
const mapStateToProps = (state, props) => {
const mapped = {
accountsTableState: getAccountsTableState(state, props),
accountsTableStateChanged: accountsTableStateChanged(state, props),
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};