mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
refactor: HOCs named imports
This commit is contained in:
@@ -8,8 +8,8 @@ import { UniversalSearch } from '@/components';
|
||||
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { compose } from '@/utils';
|
||||
import withUniversalSearchActions from './withUniversalSearchActions';
|
||||
import withUniversalSearch from './withUniversalSearch';
|
||||
import { withUniversalSearchActions } from './withUniversalSearchActions';
|
||||
import { withUniversalSearch } from './withUniversalSearch';
|
||||
|
||||
import { useGetUniversalSearchTypeOptions } from './utils';
|
||||
import DashboardUniversalSearchItemActions from './DashboardUniversalSearchItemActions';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import * as R from 'ramda';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
||||
import withUniversalSearchActions from './withUniversalSearchActions';
|
||||
import { withUniversalSearchActions } from './withUniversalSearchActions';
|
||||
|
||||
/**
|
||||
* Universal search hotkey.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import React from 'react';
|
||||
import * as R from 'ramda';
|
||||
|
||||
import withUniversalSearch from './withUniversalSearch';
|
||||
import { withUniversalSearch } from './withUniversalSearch';
|
||||
|
||||
import { getUniversalSearchItemsActions } from './utils';
|
||||
import withUniversalSearchActions from './withUniversalSearchActions';
|
||||
import { withUniversalSearchActions } from './withUniversalSearchActions';
|
||||
|
||||
/**
|
||||
* Universal search selected item action based on each resource type.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @ts-nocheck
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
export default (mapState) => {
|
||||
export const withUniversalSearch = (mapState) => {
|
||||
const mapStateToProps = (state, props) => {
|
||||
const { globalSearch } = state;
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@ export const mapDispatchToProps = (dispatch) => ({
|
||||
dispatch(universalSearchResetSelectedItem()),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps);
|
||||
export const withUniversalSearchActions = connect(null, mapDispatchToProps);
|
||||
|
||||
Reference in New Issue
Block a user