import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Button from '../../../components/ui/button'; import { SUPPORT_LINK, SUPPORT_REQUEST_LINK, } from '../../../helpers/constants/common'; import { isBeta } from '../../../helpers/utils/build-types'; import { getNumberOfSettingsInSection, handleSettingsRefs, } from '../../../helpers/utils/settings-search'; export default class InfoTab extends PureComponent { state = { version: global.platform.getVersion(), }; static contextTypes = { t: PropTypes.func, }; settingsRefs = Array( getNumberOfSettingsInSection(this.context.t, this.context.t('about')), ) .fill(undefined) .map(() => { return React.createRef(); }); componentDidUpdate() { const { t } = this.context; handleSettingsRefs(t, t('about'), this.settingsRefs); } componentDidMount() { const { t } = this.context; handleSettingsRefs(t, t('about'), this.settingsRefs); } renderInfoLinks() { const { t } = this.context; return (
{t('links')}

); } render() { const { t } = this.context; return (
{isBeta() ? t('betaMetamaskVersion') : t('metamaskVersion')}
{this.state.version}
{t('builtAroundTheWorld')}
{this.renderInfoLinks()}
MetaMask Logo
); } }