refactor: HOCs named imports

This commit is contained in:
Ahmed Bouhuolia
2026-01-01 21:58:42 +02:00
parent 5d872798ff
commit 0f377e19f3
712 changed files with 1367 additions and 1360 deletions

View File

@@ -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';

View File

@@ -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 }) => ({

View File

@@ -7,4 +7,4 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(setInventoryAdjustmentsTableState(queries)),
});
export default connect(null, mapDispatchToProps);
export const withInventoryAdjustmentActions = connect(null, mapDispatchToProps);

View File

@@ -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) => {