/* @flow */ import React, { Component } from 'react'; import { isBrowsersOptimal } from '../../base/environment'; import { translate } from '../../base/i18n'; import { CHROME, FIREFOX } from './browserLinks'; /** * The namespace of the CSS styles of UnsupportedDesktopBrowser. * * @private * @type {string} */ const _SNS = 'unsupported-desktop-browser'; /** * The type of the React {@code Component} props of * {@link JaasUnsupportedDesktopBrowser}. */ type Props = { /** * The function to translate human-readable text. */ t: Function }; /** * React component representing unsupported browser page. * * @class UnsupportedDesktopBrowser */ class JaasUnsupportedDesktopBrowser extends Component { /** * Renders the component. * * @returns {ReactElement} */ render() { return (

It looks like you're using a browser we don't support.

Please try again with the latest version of  Chrome  { this._showFirefox() && <>or Firefox }

); } /** * Returns whether or not a link to download Firefox is displayed. * * @private * @returns {boolean} */ _showFirefox() { return isBrowsersOptimal('firefox'); } } export default translate(JaasUnsupportedDesktopBrowser);