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.web.js 1017B

12345678910111213141516171819202122232425262728293031
  1. import { isSuboptimalBrowser } from '../base/environment';
  2. import { translateToHTML } from '../base/i18n';
  3. import { showWarningNotification } from '../notifications';
  4. export * from './functions.any';
  5. /**
  6. * Shows the suboptimal experience notification if needed.
  7. *
  8. * @param {Function} dispatch - The dispatch method.
  9. * @param {Function} t - The translation function.
  10. * @returns {void}
  11. */
  12. export function maybeShowSuboptimalExperienceNotification(dispatch, t) {
  13. if (isSuboptimalBrowser()) {
  14. dispatch(
  15. showWarningNotification(
  16. {
  17. titleKey: 'notify.suboptimalExperienceTitle',
  18. description: translateToHTML(
  19. t,
  20. 'notify.suboptimalBrowserWarning',
  21. {
  22. recommendedBrowserPageLink: `${window.location.origin}/static/recommendedBrowsers.html`
  23. }
  24. )
  25. }
  26. )
  27. );
  28. }
  29. }