Fix front-end generators plugin

This commit is contained in:
soupette 2019-03-26 21:29:10 +01:00
parent 114ac4a30d
commit ebbe352d90
3 changed files with 16 additions and 9 deletions

View File

@ -5,6 +5,6 @@
* Direct selector to the list state domain * Direct selector to the list state domain
*/ */
// const selectGlobalDomain = () => state => state.get(`${pluginId}-global`); // const selectGlobalDomain = () => state => state.get(`${pluginId}_global`);
export {}; export {};

View File

@ -4,16 +4,22 @@ import pluginId from 'pluginId';
/** /**
* Direct selector to the examplePage state domain * Direct selector to the examplePage state domain
*/ */
const selectExamplePageDomain = () => state => state.get(`${pluginId}-examplePage`); const selectExamplePageDomain = () => state => state.get(`${pluginId}_examplePage`);
/** /**
* Default selector used by HomePage * Default selector used by HomePage
*/ */
const makeSelectLoading = () => const makeSelectLoading = () =>
createSelector(selectExamplePageDomain(), substate => substate.get('loading')); createSelector(
selectExamplePageDomain(),
substate => substate.get('loading'),
);
const makeSelectData = () => const makeSelectData = () =>
createSelector(selectExamplePageDomain(), substate => substate.get('data')); createSelector(
selectExamplePageDomain(),
substate => substate.get('data'),
);
export { makeSelectLoading, makeSelectData }; export { makeSelectLoading, makeSelectData };

View File

@ -3,15 +3,16 @@ import pluginId from 'pluginId';
/** /**
* Direct selector to the homePage state domain * Direct selector to the homePage state domain
*/ */
const selectHomePageDomain = () => state => state.get(`${pluginId}-homePage`); const selectHomePageDomain = () => state => state.get(`${pluginId}_homePage`);
/** /**
* Default selector used by HomePage * Default selector used by HomePage
*/ */
const selectHomePage = () => createSelector( const selectHomePage = () =>
createSelector(
selectHomePageDomain(), selectHomePageDomain(),
(substate) => substate.toJS(), substate => substate.toJS(),
); );
export default selectHomePage; export default selectHomePage;