import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useSelector } from 'react-redux'; import Box from '../../../components/ui/box'; import Button from '../../../components/ui/button'; import Typography from '../../../components/ui/typography'; import { TEXT_ALIGN, TYPOGRAPHY, JUSTIFY_CONTENT, FONT_WEIGHT, } from '../../../helpers/constants/design-system'; import { ThreeStepProgressBar, threeStepStages, } from '../../../components/app/step-progress-bar'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { ONBOARDING_REVIEW_SRP_ROUTE } from '../../../helpers/constants/routes'; import { getCurrentLocale } from '../../../ducks/metamask/metamask'; import SkipSRPBackup from './skip-srp-backup-popover'; export default function SecureYourWallet() { const history = useHistory(); const t = useI18nContext(); const currentLocale = useSelector(getCurrentLocale); const [showSkipSRPBackupPopover, setShowSkipSRPBackupPopover] = useState( false, ); const handleClickRecommended = () => { history.push(ONBOARDING_REVIEW_SRP_ROUTE); }; const handleClickNotRecommended = () => { setShowSkipSRPBackupPopover(true); }; const subtitles = { en: 'English', es: 'Spanish', hi: 'Hindi', id: 'Indonesian', ja: 'Japanese', ko: 'Korean', pt: 'Portuguese', ru: 'Russian', tl: 'Tagalog', vi: 'Vietnamese', }; const defaultLang = subtitles[currentLocale] ? currentLocale : 'en'; return (