Remove single for content type b

This commit is contained in:
soupette 2019-02-11 14:26:20 +01:00
parent b52b010b61
commit 22c5ba819e
7 changed files with 17 additions and 17 deletions

View File

@ -24,12 +24,13 @@ import formReducer from 'containers/Form/reducer';
import { makeSelectShouldRefetchContentType } from 'containers/Form/selectors';
// Utils
import injectSaga from 'utils/injectSaga';
import injectReducer from 'utils/injectReducer';
// import injectSaga from 'utils/injectSaga';
// import injectReducer from 'utils/injectReducer';
import { storeData } from '../../utils/storeData';
import styles from './styles.scss';
import { modelsFetch } from './actions';
import reducer from './reducer';
import saga from './sagas';
/* eslint-disable consistent-return */
@ -92,10 +93,12 @@ const mapStateToProps = createStructuredSelector({
});
const withConnect = connect(mapStateToProps, mapDispatchToProps);
const withSaga = injectSaga({ key: 'global', saga });
const withFormReducer = injectReducer({ key: 'form', reducer: formReducer });
const withFormSaga = injectSaga({ key: 'form', saga: formSaga });
const withReducer = strapi.injectReducer({ key: 'global', reducer, pluginId: 'content-type-builder' });
const withSaga = strapi.injectSaga({ key: 'global', saga, pluginId: 'content-type-builder' });
const withFormReducer = strapi.injectReducer({ key: 'form', reducer: formReducer, pluginId: 'content-type-builder' });
const withFormSaga = strapi.injectSaga({ key: 'form', saga: formSaga, pluginId: 'content-type-builder' });
export default compose(
withReducer,
withFormReducer,
withFormSaga,
withSaga,

View File

@ -4,7 +4,7 @@ import { createSelector } from 'reselect';
* Direct selector to the list state domain
*/
const selectGlobalDomain = () => state => state.get('global');
const selectGlobalDomain = () => state => state.get('content-type-builder-global');
const makeSelectLoading = () => createSelector(
selectGlobalDomain(),

View File

@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
/**
* Direct selector to the form state domain
*/
const selectFormDomain = () => state => state.get('form');
const selectFormDomain = () => state => state.get('content-type-builder-form');
/**
* Other specific selectors

View File

@ -23,8 +23,7 @@ import ContentHeader from 'components/ContentHeader';
import EmptyContentTypeView from 'components/EmptyContentTypeView';
import TableList from 'components/TableList';
import injectSaga from 'utils/injectSaga';
import injectReducer from 'utils/injectReducer';
// Utils
import { storeData } from '../../utils/storeData';
import selectHomePage from './selectors';
@ -140,8 +139,8 @@ function mapDispatchToProps(dispatch) {
}
const withConnect = connect(mapStateToProps, mapDispatchToProps);
const withReducer = injectReducer({ key: 'homePage', reducer });
const withSaga = injectSaga({ key: 'homePage', saga });
const withReducer = strapi.injectReducer({ key: 'homePage', reducer, pluginId: 'content-type-builder' });
const withSaga = strapi.injectSaga({ key: 'homePage', saga, pluginId: 'content-type-builder' });
export default compose(
withReducer,

View File

@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
/**
* Direct selector to the homePage state domain
*/
const selectHomePageDomain = () => state => state.get('homePage');
const selectHomePageDomain = () => state => state.get('content-type-builder-homePage');
/**
* Other specific selectors

View File

@ -23,8 +23,6 @@ import Form from 'containers/Form';
import List from 'components/List';
import PluginLeftMenu from 'components/PluginLeftMenu';
import forms from 'containers/Form/forms.json';
import injectSaga from 'utils/injectSaga';
import injectReducer from 'utils/injectReducer';
import { storeData } from '../../utils/storeData';
import {
cancelChanges,
@ -355,8 +353,8 @@ function mapDispatchToProps(dispatch) {
}
const withConnect = connect(mapStateToProps, mapDispatchToProps);
const withSaga = injectSaga({ key: 'modelPage', saga });
const withReducer = injectReducer({ key: 'modelPage', reducer });
const withSaga = strapi.injectSaga({ key: 'modelPage', saga, pluginId: 'content-type-builder' });
const withReducer = strapi.injectReducer({ key: 'modelPage', reducer, pluginId: 'content-type-builder' });
export default compose(
withReducer,

View File

@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
/**
* Direct selector to the modelPage state domain
*/
const selectModelPageDomain = () => state => state.get('modelPage');
const selectModelPageDomain = () => state => state.get('content-type-builder-modelPage');
/**
* Other specific selectors