import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import Button from '../../../components/ui/button'; import Typography from '../../../components/ui/typography'; import { FONT_WEIGHT, TYPOGRAPHY, } from '../../../helpers/constants/design-system'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { setCompletedOnboarding, setFeatureFlag, setUsePhishDetect, setUseTokenDetection, } from '../../../store/actions'; import { ONBOARDING_PIN_EXTENSION_ROUTE } from '../../../helpers/constants/routes'; import { Setting } from './setting'; export default function PrivacySettings() { const t = useI18nContext(); const dispatch = useDispatch(); const history = useHistory(); const [usePhishingDetection, setUsePhishingDetection] = useState(true); const [turnOnTokenDetection, setTurnOnTokenDetection] = useState(true); const [showIncomingTransactions, setShowIncomingTransactions] = useState( true, ); const handleSubmit = () => { dispatch( setFeatureFlag('showIncomingTransactions', showIncomingTransactions), ); dispatch(setUsePhishDetect(usePhishingDetection)); dispatch(setUseTokenDetection(turnOnTokenDetection)); dispatch(setCompletedOnboarding()); history.push(ONBOARDING_PIN_EXTENSION_ROUTE); }; return ( <>
{t('setAdvancedPrivacySettings')} {t('setAdvancedPrivacySettingsDetails')}
{t('etherscan')} , {t('privacyMsg')} , ])} /> {t('jsDeliver')} , {t('privacyMsg')} , ])} />
); }