You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 489B

123456789101112131415
  1. import { toState } from '../base/redux';
  2. /**
  3. * Tells whether or not the notifications are enabled and if there are any
  4. * notifications to be displayed based on the current Redux state.
  5. *
  6. * @param {Object|Function} stateful - The redux store state.
  7. * @returns {boolean}
  8. */
  9. export function areThereNotifications(stateful) {
  10. const state = toState(stateful);
  11. const { enabled, notifications } = state['features/notifications'];
  12. return enabled && notifications.length > 0;
  13. }