From e6410e861c42673fd2df6ff8d8a6450102b915c2 Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 16 May 2024 13:09:26 -0700 Subject: [PATCH] remove gasless banner --- modules/polling/components/GaslessBanner.tsx | 62 -------------------- pages/_app.tsx | 2 - 2 files changed, 64 deletions(-) delete mode 100644 modules/polling/components/GaslessBanner.tsx diff --git a/modules/polling/components/GaslessBanner.tsx b/modules/polling/components/GaslessBanner.tsx deleted file mode 100644 index 5359d10bd..000000000 --- a/modules/polling/components/GaslessBanner.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - -SPDX-FileCopyrightText: © 2023 Dai Foundation - -SPDX-License-Identifier: AGPL-3.0-or-later - -*/ - -import { ExternalLink } from 'modules/app/components/ExternalLink'; -import Banner from 'modules/app/components/layout/header/Banner'; -import { Box, Flex, Text } from 'theme-ui'; -import { Icon } from '@makerdao/dai-ui-icons'; -import { useEffect, useState } from 'react'; -import { localStorage } from 'modules/app/client/storage/localStorage'; - -export default function GaslessBanner(): React.ReactElement { - const [bannerVisible, setBannerVisible] = useState(false); - - useEffect(() => { - const prevState = localStorage && localStorage.get('gasless-banner', true); - if (!prevState && typeof window !== 'undefined') { - setBannerVisible(true); - } - }, []); - - const onClose = () => { - setBannerVisible(false); - localStorage.set( - 'gasless-banner', - JSON.stringify({ - time: Date.now() - }) - ); - }; - return ( - - {bannerVisible && ( - - - - - Poll voting is now gasless!  - Learn more - - - - - - - } - /> - )} - - ); -} diff --git a/pages/_app.tsx b/pages/_app.tsx index f2f20c928..08aaaa5ca 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -30,7 +30,6 @@ import Banner from 'modules/app/components/layout/header/Banner'; import bannerContent from 'modules/home/data/bannerContent.json'; import { MigrationBanner } from 'modules/migration/components/MigrationBanner'; import { Web3Provider } from 'modules/web3/components/Web3Provider'; -import GaslessBanner from 'modules/polling/components/GaslessBanner'; import React, { useMemo } from 'react'; import { Analytics } from '@vercel/analytics/react'; @@ -46,7 +45,6 @@ const App = ({ Component, pageProps }: AppProps): React.ReactElement => { {activeBannerContent && } - ); }, []);