import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Button from '../../../components/ui/button'; import { Tag } from '../../../components/component-library'; import { SUPPORT_REQUEST_LINK, ///: BEGIN:ONLY_INCLUDE_IN(build-mmi) MMI_WEB_SITE, ///: END:ONLY_INCLUDE_IN } from '../../../helpers/constants/common'; import { isBeta } from '../../../helpers/utils/build-types'; import { getNumberOfSettingsInSection, handleSettingsRefs, } from '../../../helpers/utils/settings-search'; import { MetaMetricsContextProp, MetaMetricsEventCategory, MetaMetricsEventName, } from '../../../../shared/constants/metametrics'; import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils'; export default class InfoTab extends PureComponent { state = { version: global.platform.getVersion(), }; static contextTypes = { t: PropTypes.func, trackEvent: 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; let privacyUrl, siteUrl; ///: BEGIN:ONLY_INCLUDE_IN(build-mmi) privacyUrl = 'https://consensys.net/codefi/about/privacy-policy/'; siteUrl = MMI_WEB_SITE; ///: END:ONLY_INCLUDE_IN ///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask) privacyUrl = 'https://metamask.io/privacy.html'; siteUrl = 'https://metamask.io/'; ///: END:ONLY_INCLUDE_IN return (