mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-25 09:09:48 +00:00
refactor: HOCs named imports
This commit is contained in:
@@ -8,7 +8,7 @@ import { DashboardContentTable, DashboardPageContent } from '@/components';
|
||||
import { InventoryAdjustmentsProvider } from './InventoryAdjustmentsProvider';
|
||||
import InventoryAdjustmentTable from './InventoryAdjustmentTable';
|
||||
|
||||
import withInventoryAdjustments from './withInventoryAdjustments';
|
||||
import { withInventoryAdjustments } from './withInventoryAdjustments';
|
||||
|
||||
import { compose, transformTableStateToQuery } from '@/utils';
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
import { useInventoryAdjustmentsColumns, ActionsMenu } from './components';
|
||||
import { useInventoryAdjustmentsContext } from './InventoryAdjustmentsProvider';
|
||||
|
||||
import withInventoryAdjustments from './withInventoryAdjustments';
|
||||
import withInventoryAdjustmentActions from './withInventoryAdjustmentActions';
|
||||
import withAlertsActions from '@/containers/Alert/withAlertActions';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { withInventoryAdjustments } from './withInventoryAdjustments';
|
||||
import { withInventoryAdjustmentActions } from './withInventoryAdjustmentActions';
|
||||
import { withAlertActions } from '@/containers/Alert/withAlertActions';
|
||||
import { withDrawerActions } from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
@@ -26,7 +26,7 @@ function InventoryAdjustmentDataTable({
|
||||
// #withInventoryAdjustments
|
||||
inventoryAdjustmentTableState,
|
||||
|
||||
// #withAlertsActions
|
||||
// #withAlertActions
|
||||
openAlert,
|
||||
|
||||
// #withDrawerActions
|
||||
@@ -112,7 +112,7 @@ function InventoryAdjustmentDataTable({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withAlertsActions,
|
||||
withAlertActions,
|
||||
withInventoryAdjustmentActions,
|
||||
withDrawerActions,
|
||||
withInventoryAdjustments(({ inventoryAdjustmentTableState }) => ({
|
||||
|
||||
@@ -7,4 +7,4 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
dispatch(setInventoryAdjustmentsTableState(queries)),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps);
|
||||
export const withInventoryAdjustmentActions = connect(null, mapDispatchToProps);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { getInventroyAdjsTableStateFactory } from '@/store/inventoryAdjustments/inventoryAdjustment.selector';
|
||||
|
||||
export default (mapState) => {
|
||||
export const withInventoryAdjustments = (mapState) => {
|
||||
const getInventoryAdjustmentTableState = getInventroyAdjsTableStateFactory();
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
|
||||
Reference in New Issue
Block a user