mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
re-structure to monorepo.
This commit is contained in:
21
packages/webapp/src/containers/Accounts/withAccounts.tsx
Normal file
21
packages/webapp/src/containers/Accounts/withAccounts.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
// @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);
|
||||
};
|
||||
Reference in New Issue
Block a user