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.

actions.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {
  2. DISMISS_MOBILE_APP_PROMO,
  3. SET_UNSUPPORTED_BROWSER
  4. } from './actionTypes';
  5. /**
  6. * Returns a Redux action which signals that the UnsupportedMobileBrowser which
  7. * was rendered as a promotion of the mobile app on a browser was dismissed by
  8. * the user. For example, the Web app may possibly run in Google Chrome
  9. * on Android but we choose to promote the mobile app anyway claiming the user
  10. * experience provided by the Web app is inferior to that of the mobile app.
  11. * Eventually, the user may choose to dismiss the promotion of the mobile app
  12. * and take their chances with the Web app instead. If unused, then we have
  13. * chosen to force the mobile app and not allow the Web app in mobile browsers.
  14. *
  15. * @returns {{
  16. * type: DISMISS_MOBILE_APP_PROMO
  17. * }}
  18. */
  19. export function dismissMobileAppPromo() {
  20. return {
  21. type: DISMISS_MOBILE_APP_PROMO
  22. };
  23. }
  24. /**
  25. * Sets unsupported browser object.
  26. *
  27. * @param {Object} unsupportedBrowser - Object describing the unsupported
  28. * browser.
  29. * @returns {{
  30. * type: SET_UNSUPPORTED_BROWSER,
  31. * unsupportedBrowser: Object
  32. * }}
  33. */
  34. export function setUnsupportedBrowser(unsupportedBrowser) {
  35. return {
  36. type: SET_UNSUPPORTED_BROWSER,
  37. unsupportedBrowser
  38. };
  39. }