您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }