import React, { useState, useContext } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import PropTypes from 'prop-types'; import Box from '../../../components/ui/box'; import Button from '../../../components/ui/button'; import Typography from '../../../components/ui/typography'; import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { ONBOARDING_CONFIRM_SRP_ROUTE } from '../../../helpers/constants/routes'; import { TEXT_ALIGN, TypographyVariant, JustifyContent, FONT_WEIGHT, IconColor, } from '../../../helpers/constants/design-system'; import { ThreeStepProgressBar, threeStepStages, } from '../../../components/app/step-progress-bar'; import { EVENT_NAMES, EVENT } from '../../../../shared/constants/metametrics'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { Icon, ICON_NAMES } from '../../../components/component-library'; import RecoveryPhraseChips from './recovery-phrase-chips'; export default function RecoveryPhrase({ secretRecoveryPhrase }) { const history = useHistory(); const t = useI18nContext(); const { search } = useLocation(); const [copied, handleCopy] = useCopyToClipboard(); const [phraseRevealed, setPhraseRevealed] = useState(false); const [hiddenPhrase, setHiddenPhrase] = useState(false); const searchParams = new URLSearchParams(search); const isFromReminderParam = searchParams.get('isFromReminder') ? '/?isFromReminder=true' : ''; const trackEvent = useContext(MetaMetricsContext); return (
{t('seedPhraseWriteDownHeader')} {t('seedPhraseWriteDownDetails')} {t('tips')}:
  • {t('seedPhraseIntroSidebarBulletOne')}
  • {t('seedPhraseIntroSidebarBulletThree')}
  • {t('seedPhraseIntroSidebarBulletFour')}
{phraseRevealed ? (
) : ( )}
); } RecoveryPhrase.propTypes = { secretRecoveryPhrase: PropTypes.string, };