mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 01:07:27 +00:00

Created OLD folder. Fix load plugin when no Initializer is provided. Signed-off-by: soupette <cyril.lpz@gmail.com>
26 lines
678 B
JavaScript
26 lines
678 B
JavaScript
import { createSelector } from 'reselect';
|
|
import pluginId from '../../pluginId';
|
|
|
|
/**
|
|
* Direct selector to the homePage state domain
|
|
*/
|
|
const selectHomePageDomain = () => state => state.get(`${pluginId}_homePage`);
|
|
|
|
/**
|
|
* Default selector used by HomePage
|
|
*/
|
|
|
|
const selectHomePage = () =>
|
|
createSelector(selectHomePageDomain(), substate => substate.toJS());
|
|
|
|
const makeSelectParams = () =>
|
|
createSelector(selectHomePageDomain(), substate =>
|
|
substate.get('params').toJS()
|
|
);
|
|
|
|
const makeSelectSearch = () =>
|
|
createSelector(selectHomePageDomain(), substate => substate.get('search'));
|
|
|
|
export default selectHomePage;
|
|
export { makeSelectSearch, makeSelectParams };
|