mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Fix & connectors folder
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { compose } from 'utils';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import CurrencyFromDialogConnect from 'connectors/CurrencyFromDialog.connect';
|
||||
import withDialog from 'containers/Dialogs/withDialog';
|
||||
|
||||
function Currencies({ openDialog }) {
|
||||
const onClickNewCurrency = () => {
|
||||
openDialog('currency-form',{});
|
||||
@@ -17,4 +17,4 @@ function Currencies({ openDialog }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(DialogConnect, CurrencyFromDialogConnect)(Currencies);
|
||||
export default compose(withDialog)(Currencies);
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import Icon from 'components/Icon';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import withDialog from 'containers/Dialogs/withDialog';
|
||||
import {compose} from 'utils';
|
||||
|
||||
function CurrenciesActions({
|
||||
@@ -27,5 +27,5 @@ function CurrenciesActions({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
DialogConnect,
|
||||
withDialog,
|
||||
)(CurrenciesActions);
|
||||
@@ -12,13 +12,13 @@ import { useQuery } from 'react-query';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import { compose } from 'utils';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import withDialog from 'containers/Dialogs/withDialog';
|
||||
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import DataTable from 'components/DataTable';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
|
||||
import withDashboard from 'connectors/Dashboard.connector';
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withCurrencies from 'containers/Currencies/withCurrencies';
|
||||
import withCurrenciesActions from 'containers/Currencies/withCurrenciesActions';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
@@ -156,6 +156,6 @@ export default compose(
|
||||
currenciesList,
|
||||
})),
|
||||
withCurrenciesActions,
|
||||
DialogConnect,
|
||||
withDialog,
|
||||
withDashboard
|
||||
)(CurrenciesList);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Tabs, Tab } from '@blueprintjs/core';
|
||||
import PreferencesSubContent from 'components/Preferences/PreferencesSubContent';
|
||||
import connector from 'connectors/UsersPreferences.connector';
|
||||
import withUserPreferences from 'containers/Preferences/Users/withUserPreferences'
|
||||
|
||||
function UsersPreferences({ openDialog }) {
|
||||
const onChangeTabs = (currentTabId) => {};
|
||||
@@ -19,4 +19,4 @@ function UsersPreferences({ openDialog }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default connector(UsersPreferences);
|
||||
export default withUserPreferences(UsersPreferences);
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import Icon from 'components/Icon';
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import withDialog from 'containers/Dialogs/withDialog';
|
||||
import {compose} from 'utils';
|
||||
|
||||
function UsersActions({
|
||||
@@ -34,5 +34,5 @@ function UsersActions({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
DialogConnect,
|
||||
withDialog,
|
||||
)(UsersActions);
|
||||
@@ -24,11 +24,12 @@ import LoadingIndicator from 'components/LoadingIndicator';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
|
||||
import DialogConnect from 'connectors/Dialog.connector';
|
||||
import withDialog from 'containers/Dialogs/withDialog';
|
||||
import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withUsers from 'containers/Users/withUsers';
|
||||
import withUsersActions from 'containers/Users/withUsersActions';
|
||||
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
function UsersListPreferences({
|
||||
@@ -239,7 +240,7 @@ function UsersListPreferences({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
DialogConnect,
|
||||
withDialog,
|
||||
withDashboard,
|
||||
withUsers,
|
||||
withUsersActions,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import {connect} from 'react-redux';
|
||||
import t from 'store/types';
|
||||
|
||||
export const mapStateToProps = (state, props) => {
|
||||
|
||||
};
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
openDialog: (name, payload) => dispatch({ type: t.OPEN_DIALOG, name, payload }),
|
||||
closeDialog: (name, payload) => dispatch({ type: t.CLOSE_DIALOG, name, payload }),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps);
|
||||
Reference in New Issue
Block a user