mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-27 18:19:48 +00:00
refactor: HOCs named imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @ts-nocheck
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { withDrawerActions } from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { AbilitySubject, AccountAction } from '@/constants/abilityOption';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
|
||||
@@ -36,12 +36,12 @@ import { useAccountsChartContext } from './AccountsChartProvider';
|
||||
import { useDownloadExportPdf } from '@/hooks/query/FinancialReports/use-export-pdf';
|
||||
import { useBulkDeleteAccountsDialog } from './hooks/use-bulk-delete-accounts-dialog';
|
||||
|
||||
import withAccounts from './withAccounts';
|
||||
import withAccountsTableActions from './withAccountsTableActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import withAlertActions from '@/containers/Alert/withAlertActions';
|
||||
import withSettings from '@/containers/Settings/withSettings';
|
||||
import withSettingsActions from '@/containers/Settings/withSettingsActions';
|
||||
import { withAccounts } from './withAccounts';
|
||||
import { withAccountsTableActions } from './withAccountsTableActions';
|
||||
import { withDialogActions } from '@/containers/Dialog/withDialogActions';
|
||||
import { withAlertActions } from '@/containers/Alert/withAlertActions';
|
||||
import { withSettings } from '@/containers/Settings/withSettings';
|
||||
import { withSettingsActions } from '@/containers/Settings/withSettingsActions';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import { AccountsChartProvider } from './AccountsChartProvider';
|
||||
import AccountsActionsBar from './AccountsActionsBar';
|
||||
import AccountsDataTable from './AccountsDataTable';
|
||||
|
||||
import withAccounts from '@/containers/Accounts/withAccounts';
|
||||
import withAccountsTableActions from './withAccountsTableActions';
|
||||
import { withAccounts } from '@/containers/Accounts/withAccounts';
|
||||
import { withAccountsTableActions } from './withAccountsTableActions';
|
||||
|
||||
import { transformAccountsStateToQuery } from './utils';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
@@ -18,11 +18,11 @@ import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
import { TABLES } from '@/constants/tables';
|
||||
import { DialogsName } from '@/constants/dialogs';
|
||||
|
||||
import withSettings from '@/containers/Settings/withSettings';
|
||||
import withAlertsActions from '@/containers/Alert/withAlertActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import withAccountsTableActions from './withAccountsTableActions';
|
||||
import { withSettings } from '@/containers/Settings/withSettings';
|
||||
import { withAlertActions } from '@/containers/Alert/withAlertActions';
|
||||
import { withDialogActions } from '@/containers/Dialog/withDialogActions';
|
||||
import { withDrawerActions } from '@/containers/Drawer/withDrawerActions';
|
||||
import { withAccountsTableActions } from './withAccountsTableActions';
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
@@ -145,7 +145,7 @@ function AccountsDataTable({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withAlertsActions,
|
||||
withAlertActions,
|
||||
withDrawerActions,
|
||||
withDialogActions,
|
||||
withAccountsTableActions,
|
||||
|
||||
@@ -6,8 +6,8 @@ import intl from 'react-intl-universal';
|
||||
import { DashboardViewsTabs } from '@/components';
|
||||
import { useAccountsChartContext } from './AccountsChartProvider';
|
||||
|
||||
import withAccounts from './withAccounts';
|
||||
import withAccountsTableActions from './withAccountsTableActions';
|
||||
import { withAccounts } from './withAccounts';
|
||||
import { withAccountsTableActions } from './withAccountsTableActions';
|
||||
|
||||
import { compose, transfromViewsToTabs } from '@/utils';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
accountsTableStateChangedFactory,
|
||||
} from '@/store/accounts/accounts.selectors';
|
||||
|
||||
export default (mapState) => {
|
||||
export const withAccounts = (mapState) => {
|
||||
const getAccountsTableState = getAccountsTableStateFactory();
|
||||
const accountsTableStateChanged = accountsTableStateChangedFactory();
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ const mapActionsToProps = (dispatch) => ({
|
||||
dispatch(setAccountsSelectedRows(selectedRows)),
|
||||
});
|
||||
|
||||
export default connect(null, mapActionsToProps);
|
||||
export const withAccountsTableActions = connect(null, mapActionsToProps);
|
||||
|
||||
Reference in New Issue
Block a user