import React, { Component } from 'react'; import PropTypes from 'prop-types'; import MetaFoxLogo from '../../../ui/metafox-logo'; import PageContainerFooter from '../../../ui/page-container/page-container-footer'; import { EVENT } from '../../../../../shared/constants/metametrics'; export default class MetaMetricsOptInModal extends Component { static propTypes = { setParticipateInMetaMetrics: PropTypes.func, hideModal: PropTypes.func, }; static contextTypes = { trackEvent: PropTypes.func, t: PropTypes.func, }; render() { const { trackEvent, t } = this.context; const { setParticipateInMetaMetrics, hideModal } = this.props; return (
{t('metametricsHelpImproveMetaMask')}
{t('metametricsOptInDescription')}
{t('metametricsCommitmentsIntro')}
{t('metametricsCommitmentsAllowOptOut')}
{t('metametricsCommitmentsSendAnonymizedEvents')}
{t('metametricsCommitmentsNeverCollectKeysEtc', [ {t('metametricsCommitmentsBoldNever')} , ])}
{t('metametricsCommitmentsNeverCollectIP', [ {t('metametricsCommitmentsBoldNever')} , ])}
{t('metametricsCommitmentsNeverSellDataForProfit', [ {t('metametricsCommitmentsBoldNever')} , ])}
{t('gdprMessage', [ {t('gdprMessagePrivacyPolicy')} , ])}
{ setParticipateInMetaMetrics(false).then(() => { trackEvent( { category: EVENT.CATEGORIES.ONBOARDING, event: 'Metrics Opt Out', properties: { action: 'Metrics Option', legacy_event: true, }, }, { isOptIn: true, excludeMetaMetricsId: true, }, ); hideModal(); }); }} cancelText={t('noThanks')} hideCancel={false} onSubmit={() => { setParticipateInMetaMetrics(true).then(() => { trackEvent( { category: EVENT.CATEGORIES.ONBOARDING, event: 'Metrics Opt In', properties: { action: 'Metrics Option', legacy_event: true, }, }, { isOptIn: true, }, ); hideModal(); }); }} submitText={t('affirmAgree')} disabled={false} />
); } }