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.native.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // @flow
  2. import React from 'react';
  3. import { getFeatureFlag, WELCOME_PAGE_ENABLED } from '../base/flags';
  4. import { IconArrowBack } from '../base/icons';
  5. import HeaderNavigationButton
  6. from '../conference/components/native/HeaderNavigationButton';
  7. /**
  8. * Determines whether the {@code WelcomePage} is enabled by the app itself
  9. * (e.g. Programmatically via the Jitsi Meet SDK for Android and iOS). Not to be
  10. * confused with {@link isWelcomePageUserEnabled}.
  11. *
  12. * @param {Function|Object} stateful - The redux state or {@link getState}
  13. * function.
  14. * @returns {boolean} If the {@code WelcomePage} is enabled by the app, then
  15. * {@code true}; otherwise, {@code false}.
  16. */
  17. export function isWelcomePageAppEnabled(stateful: Function | Object) {
  18. return Boolean(getFeatureFlag(stateful, WELCOME_PAGE_ENABLED));
  19. }
  20. /**
  21. * Render header arrow back button for navigation.
  22. *
  23. * @param {Function} onPress - Callback for when the button is pressed
  24. * function.
  25. * @returns {ReactElement}
  26. */
  27. export function renderArrowBackButton(onPress: Function) {
  28. return (
  29. <HeaderNavigationButton
  30. onPress = { onPress }
  31. src = { IconArrowBack } />
  32. );
  33. }