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 707B

123456789101112131415161718192021222324
  1. // @flow
  2. import { toState } from '../base/redux';
  3. declare var APP: Object;
  4. /**
  5. * Determines whether the {@code WelcomePage} is enabled by the user either
  6. * herself or through her deployment config(uration). Not to be confused with
  7. * {@link isWelcomePageAppEnabled}.
  8. *
  9. * @param {Function|Object} stateful - The redux state or {@link getState}
  10. * function.
  11. * @returns {boolean} If the {@code WelcomePage} is enabled by the user, then
  12. * {@code true}; otherwise, {@code false}.
  13. */
  14. export function isWelcomePageUserEnabled(stateful: Function | Object) {
  15. return (
  16. typeof APP === 'undefined'
  17. ? true
  18. : toState(stateful)['features/base/config'].enableWelcomePage);
  19. }