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.

UnsupportedDesktopBrowser.js 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* @flow */
  2. import React, { Component } from 'react';
  3. import { Platform } from '../../base/react';
  4. import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
  5. import HideNotificationBarStyle from './HideNotificationBarStyle';
  6. /**
  7. * Describes styles namespace for this component.
  8. *
  9. * @type {string}
  10. */
  11. const NS = 'unsupported-desktop-browser';
  12. /**
  13. * React component representing unsupported browser page.
  14. *
  15. * @class UnsupportedDesktopBrowser
  16. */
  17. export default class UnsupportedDesktopBrowser extends Component {
  18. /**
  19. * Renders the component.
  20. *
  21. * @returns {ReactElement}
  22. */
  23. render() {
  24. return (
  25. <div className = { NS }>
  26. <h2 className = { `${NS}__title` }>
  27. It looks like you're using a browser we don't support.
  28. </h2>
  29. <p className = { `${NS}__description` }>
  30. Please try again with the latest version of&nbsp;
  31. <a
  32. className = { `${NS}__link` }
  33. href = { CHROME } >Chrome</a>,&nbsp;
  34. <a
  35. className = { `${NS}__link` }
  36. href = { FIREFOX }>Firefox</a> or&nbsp;
  37. { this._showSafariLinkIfRequired() }
  38. { this._showIELinkIfRequired() }.
  39. </p>
  40. <HideNotificationBarStyle />
  41. </div>
  42. );
  43. }
  44. /**
  45. * Depending on the platform returns the link to IE browser.
  46. *
  47. * @returns {ReactElement|null}
  48. * @private
  49. */
  50. _showIELinkIfRequired() {
  51. if (Platform.OS === 'windows') {
  52. return (
  53. <a
  54. className = { `${NS}__link` }
  55. href = { IE }>IE</a>
  56. );
  57. }
  58. return null;
  59. }
  60. /**
  61. * Depending on the platform returns the link to Safari browser.
  62. *
  63. * @returns {ReactElement|null}
  64. * @private
  65. */
  66. _showSafariLinkIfRequired() {
  67. if (Platform.OS === 'mac') {
  68. return (
  69. <a
  70. className = { `${NS}__link` }
  71. href = { SAFARI }>Safari</a>
  72. );
  73. }
  74. return null;
  75. }
  76. }