mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 17:26:11 +00:00
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 };
|