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

@@ -37,12 +37,12 @@ import { useAccountTransactionsContext } from './AccountTransactionsProvider';
import { useMediaQuery } from '@/hooks/useMediaQuery';
import { useAppShellContext } from '@/components/AppShell/AppContentShell/AppContentShellProvider';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import withSettings from '@/containers/Settings/withSettings';
import withSettingsActions from '@/containers/Settings/withSettingsActions';
import { withDialogActions } from '@/containers/Dialog/withDialogActions';
import { withSettings } from '@/containers/Settings/withSettings';
import { withSettingsActions } from '@/containers/Settings/withSettingsActions';
import { withBankingActions } from '../withBankingActions';
import { withBanking } from '../withBanking';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import {
useUpdateBankAccount,
useExcludeUncategorizedTransactions,

View File

@@ -14,9 +14,9 @@ import {
} from '@/components';
import { TABLES } from '@/constants/tables';
import withSettings from '@/containers/Settings/withSettings';
import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import { withSettings } from '@/containers/Settings/withSettings';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { withDrawerActions } from '@/containers/Drawer/withDrawerActions';
import { withBankingActions } from '../withBankingActions';
import { useMemorizedColumnsWidths } from '@/hooks';
@@ -36,7 +36,7 @@ function AccountTransactionsDataTable({
// #withSettings
cashflowTansactionsTableSize,
// #withAlertsActions
// #withAlertActions
openAlert,
// #withDrawerActions
@@ -157,7 +157,7 @@ export default compose(
withSettings(({ cashflowTransactionsSettings }) => ({
cashflowTansactionsTableSize: cashflowTransactionsSettings?.tableSize,
})),
withAlertsActions,
withAlertActions,
withDrawerActions,
withBankingActions,
)(AccountTransactionsDataTable);

View File

@@ -6,7 +6,7 @@ import {
TableSkeletonHeader,
TableVirtualizedListRows,
} from '@/components';
import withSettings from '@/containers/Settings/withSettings';
import { withSettings } from '@/containers/Settings/withSettings';
import { withBankingActions } from '../../withBankingActions';
import { useAccountTransactionsContext } from '../AccountTransactionsProvider';

View File

@@ -13,7 +13,7 @@ import { TABLES } from '@/constants/tables';
import { ActionsMenu } from './components';
import { BankAccountDataTable } from '../components/BankAccountDataTable';
import withSettings from '@/containers/Settings/withSettings';
import { withSettings } from '@/containers/Settings/withSettings';
import { withBankingActions } from '../../withBankingActions';
import { withBanking } from '../../withBanking';

View File

@@ -3,8 +3,8 @@ import React from 'react';
import { Intent, Alert } from '@blueprintjs/core';
import { AppToaster, FormattedMessage as T } from '@/components';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertStoreConnect } from '@/containers/Alert/withAlertStoreConnect';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { usePauseFeedsBankAccount } from '@/hooks/query/bank-accounts';
import { compose } from '@/utils';

View File

@@ -3,8 +3,8 @@ import React from 'react';
import { Intent, Alert } from '@blueprintjs/core';
import { AppToaster, FormattedMessage as T } from '@/components';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertStoreConnect } from '@/containers/Alert/withAlertStoreConnect';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { useResumeFeedsBankAccount } from '@/hooks/query/bank-accounts';
import { compose } from '@/utils';

View File

@@ -3,8 +3,8 @@ import React from 'react';
import { Intent, Alert } from '@blueprintjs/core';
import { AppToaster, FormattedMessage as T } from '@/components';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { withAlertStoreConnect } from '@/containers/Alert/withAlertStoreConnect';
import { withAlertActions } from '@/containers/Alert/withAlertActions';
import { useUncategorizeTransactionsBulkAction } from '@/hooks/query/bank-transactions';
import { compose } from '@/utils';

View File

@@ -5,7 +5,7 @@ import * as R from 'ramda';
import { Form, Formik, FormikHelpers } from 'formik';
import { AppToaster, FFormGroup, FInputGroup } from '@/components';
import { useDisconnectBankAccount } from '@/hooks/query/bank-rules';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import { withDialogActions } from '@/containers/Dialog/withDialogActions';
import { DialogsName } from '@/constants/dialogs';
interface DisconnectFormValues {

View File

@@ -2,7 +2,7 @@
import { connect } from 'react-redux';
import { getCashflowAccountsTableStateFactory } from '@/store/CashflowAccounts/CashflowAccounts.selectors';
export default (mapState) => {
export const withCashflowAccounts = (mapState) => {
const getCashflowAccountsTableState = getCashflowAccountsTableStateFactory();
const mapStateToProps = (state, props) => {

View File

@@ -13,4 +13,4 @@ const mapActionsToProps = (dispatch) => ({
dispatch(resetCashflowAccountsTableState()),
});
export default connect(null, mapActionsToProps);
export const withCashflowAccountsTableActions = connect(null, mapActionsToProps);