選択できるのは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. }