Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

functions.ts 751B

123456789101112131415161718192021
  1. import { IStateful } from '../base/app/types';
  2. import { WELCOME_PAGE_ENABLED } from '../base/flags/constants';
  3. import { getFeatureFlag } from '../base/flags/functions';
  4. import { toState } from '../base/redux/functions';
  5. /**
  6. * Determines whether the {@code WelcomePage} is enabled.
  7. *
  8. * @param {IStateful} stateful - The redux state or {@link getState}
  9. * function.
  10. * @returns {boolean} If the {@code WelcomePage} is enabled by the app, then
  11. * {@code true}; otherwise, {@code false}.
  12. */
  13. export function isWelcomePageEnabled(stateful: IStateful) {
  14. if (navigator.product === 'ReactNative') {
  15. return getFeatureFlag(stateful, WELCOME_PAGE_ENABLED, false);
  16. }
  17. return toState(stateful)['features/base/config'].enableWelcomePage;
  18. }