mirror of
https://github.com/strapi/strapi.git
synced 2025-08-11 18:27:22 +00:00
32 lines
743 B
JavaScript
32 lines
743 B
JavaScript
![]() |
import { createSelector } from 'reselect';
|
||
|
|
||
|
/**
|
||
|
* Direct selector to the notificationProvider state domain
|
||
|
*/
|
||
|
const selectNotificationProviderDomain = () => state => state.get('notification');
|
||
|
|
||
|
/**
|
||
|
* Other specific selectors
|
||
|
*/
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Default selector used by NotificationProvider
|
||
|
*/
|
||
|
|
||
|
const selectNotificationProvider = () => createSelector(
|
||
|
selectNotificationProviderDomain(),
|
||
|
(notificationProviderState) => notificationProviderState.toJS()
|
||
|
);
|
||
|
|
||
|
const selectNotifications = () => createSelector(
|
||
|
selectNotificationProviderDomain(),
|
||
|
(notificationProviderState) => notificationProviderState.get('notifications')
|
||
|
);
|
||
|
|
||
|
export default selectNotificationProvider;
|
||
|
export {
|
||
|
selectNotificationProviderDomain,
|
||
|
selectNotifications,
|
||
|
};
|