mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
refactor: HOCs named imports
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -13,4 +13,4 @@ const mapActionsToProps = (dispatch) => ({
|
||||
dispatch(resetCashflowAccountsTableState()),
|
||||
});
|
||||
|
||||
export default connect(null, mapActionsToProps);
|
||||
export const withCashflowAccountsTableActions = connect(null, mapActionsToProps);
|
||||
|
||||
Reference in New Issue
Block a user