From b21c79e4bedf6c10ad8443065fd3b0f6562d4848 Mon Sep 17 00:00:00 2001 From: KillariDev Date: Thu, 28 Dec 2023 12:24:00 +0200 Subject: [PATCH] remove privacy policy modal --- src/components/NavBar/MenuDropdown.tsx | 10 -- src/components/PrivacyPolicy/index.tsx | 182 ------------------------- 2 files changed, 192 deletions(-) delete mode 100644 src/components/PrivacyPolicy/index.tsx diff --git a/src/components/NavBar/MenuDropdown.tsx b/src/components/NavBar/MenuDropdown.tsx index b574816a933..c9e9531161d 100644 --- a/src/components/NavBar/MenuDropdown.tsx +++ b/src/components/NavBar/MenuDropdown.tsx @@ -1,7 +1,6 @@ import { t, Trans } from '@lingui/macro' import { InterfaceElementName } from '@uniswap/analytics-events' import FeatureFlagModal from 'components/FeatureFlagModal/FeatureFlagModal' -import { PrivacyPolicyModal } from 'components/PrivacyPolicy' import { useOnClickOutside } from 'hooks/useOnClickOutside' import { Box } from 'nft/components/Box' import { Column, Row } from 'nft/components/Flex' @@ -200,14 +199,6 @@ export const MenuDropdown = () => { Feedback - { - toggleOpen() - togglePrivacyPolicy() - }} - > - Legal & Privacy ↗ - {(isDevelopmentEnv() || isStagingEnv()) && ( { @@ -234,7 +225,6 @@ export const MenuDropdown = () => { )} - ) diff --git a/src/components/PrivacyPolicy/index.tsx b/src/components/PrivacyPolicy/index.tsx deleted file mode 100644 index 38f342d6bdc..00000000000 --- a/src/components/PrivacyPolicy/index.tsx +++ /dev/null @@ -1,182 +0,0 @@ -import { Trans } from '@lingui/macro' -import { SharedEventName } from '@uniswap/analytics-events' -import { sendAnalyticsEvent } from 'analytics' -import Card, { DarkGrayCard } from 'components/Card' -import Row, { AutoRow, RowBetween } from 'components/Row' -import { useEffect, useRef } from 'react' -import { ArrowDown, Info, X } from 'react-feather' -import styled from 'styled-components' -import { ExternalLink, ThemedText } from 'theme/components' -import { isMobile } from 'utils/userAgent' - -import { useModalIsOpen, useTogglePrivacyPolicy } from '../../state/application/hooks' -import { ApplicationModal } from '../../state/application/reducer' -import { AutoColumn } from '../Column' -import Modal from '../Modal' - -const Wrapper = styled.div` - max-height: 70vh; - overflow: auto; - padding: 0 1rem; -` - -const StyledExternalCard = styled(Card)` - background-color: ${({ theme }) => theme.accent2}; - padding: 0.5rem; - width: 100%; - - :hover, - :focus, - :active { - background-color: ${({ theme }) => theme.neutral3}; - } -` - -const HoverText = styled.div` - text-decoration: none; - color: ${({ theme }) => theme.neutral1}; - display: flex; - align-items: center; - - :hover { - cursor: pointer; - } -` - -const StyledLinkOut = styled(ArrowDown)` - transform: rotate(230deg); -` - -const EXTERNAL_APIS = [ - { - name: 'Auto Router', - description: The app fetches the optimal trade route from a Uniswap Labs server., - }, - { - name: 'Infura', - description: The app fetches on-chain data and constructs contract calls with an Infura API., - }, - { - name: 'TRM Labs', - description: ( - <> - - The app securely collects your wallet address and shares it with TRM Labs Inc. for risk and compliance - reasons. - {' '} - - Learn more - - - ), - }, - { - name: 'Google Analytics & Amplitude', - description: The app logs anonymized usage statistics in order to improve over time., - }, - { - name: 'The Graph', - description: The app fetches blockchain data from The Graph’s hosted service., - }, -] - -export function PrivacyPolicyModal() { - const node = useRef() - const open = useModalIsOpen(ApplicationModal.PRIVACY_POLICY) - const toggle = useTogglePrivacyPolicy() - - useEffect(() => { - if (!open) return - - sendAnalyticsEvent(SharedEventName.PAGE_VIEWED, { - category: 'Modal', - action: 'Show Legal', - }) - }, [open]) - - return ( - toggle()}> - - - - Legal & Privacy - - toggle()}> - - - - - - - ) -} - -function PrivacyPolicy() { - return ( - { - // prevent modal gesture handler from dismissing modal when content is scrolling - if (isMobile) { - e.stopPropagation() - } - }} - > - - - - - - - - - Uniswap Labs' Terms of Service - - - - - - - - - - - - - Privacy Policy - - - - - - - - - This app uses the following third-party APIs: - - - {EXTERNAL_APIS.map(({ name, description }, i) => ( - - - - - - {name} - - - {description} - - - ))} - - - - Learn more - - - - - - - ) -}