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
*/
// const selectGlobalDomain = () => state => state.get(`${pluginId}-global`);
// const selectGlobalDomain = () => state => state.get(`${pluginId}_global`);
export {};

View File

@ -4,16 +4,22 @@ import pluginId from 'pluginId';
/**
* 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
*/
const makeSelectLoading = () =>
createSelector(selectExamplePageDomain(), substate => substate.get('loading'));
createSelector(
selectExamplePageDomain(),
substate => substate.get('loading'),
);
const makeSelectData = () =>
createSelector(selectExamplePageDomain(), substate => substate.get('data'));
createSelector(
selectExamplePageDomain(),
substate => substate.get('data'),
);
export { makeSelectLoading, makeSelectData };

View File

@ -3,15 +3,16 @@ import pluginId from 'pluginId';
/**
* 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
*/
const selectHomePage = () => createSelector(
selectHomePageDomain(),
(substate) => substate.toJS(),
);
const selectHomePage = () =>
createSelector(
selectHomePageDomain(),
substate => substate.toJS(),
);
export default selectHomePage;