From ebaadf76f06b002b224dc0a3707ff7533ab34d83 Mon Sep 17 00:00:00 2001
From: Hayden Shively <17186559+haydenshively@users.noreply.github.com>
Date: Tue, 6 Feb 2024 13:33:06 -0600
Subject: [PATCH] Remove welcome modal and simply start on Markets page
---
earn/src/App.tsx | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/earn/src/App.tsx b/earn/src/App.tsx
index 35eff6e4..647f2f4b 100644
--- a/earn/src/App.tsx
+++ b/earn/src/App.tsx
@@ -1,11 +1,10 @@
import React, { Suspense, useEffect } from 'react';
import { ApolloClient, InMemoryCache, HttpLink, gql } from '@apollo/react-hooks';
-import { Route, Routes, Navigate, useNavigate } from 'react-router-dom';
+import { Route, Routes, Navigate } from 'react-router-dom';
import AccountBlockedModal from 'shared/lib/components/common/AccountBlockedModal';
import Footer from 'shared/lib/components/common/Footer';
import { Text } from 'shared/lib/components/common/Typography';
-import WelcomeModal from 'shared/lib/components/common/WelcomeModal';
import WagmiProvider from 'shared/lib/components/WagmiProvider';
import { AccountRiskResult } from 'shared/lib/data/AccountRisk';
import { screenAddress } from 'shared/lib/data/AccountRisk';
@@ -16,7 +15,6 @@ import { useChainDependentState } from 'shared/lib/data/hooks/UseChainDependentS
import useEffectOnce from 'shared/lib/data/hooks/UseEffectOnce';
import { GeoFencingContext, useGeoFencing } from 'shared/lib/data/hooks/UseGeoFencing';
import useSafeState from 'shared/lib/data/hooks/UseSafeState';
-import { getLocalStorageBoolean, setLocalStorageBoolean } from 'shared/lib/util/LocalStorage';
import ScrollToTop from 'shared/lib/util/ScrollToTop';
import { useAccount, useNetwork, useProvider } from 'wagmi';
import { Chain } from 'wagmi/chains';
@@ -99,11 +97,8 @@ export const ChainContext = React.createContext({
});
function AppBodyWrapper() {
- const [isWelcomeModalOpen, setIsWelcomeModalOpen] = React.useState(false);
const { activeChain, setActiveChain } = React.useContext(ChainContext);
- const account = useAccount();
const network = useNetwork();
- const navigate = useNavigate();
const isAllowed = useGeoFencing(activeChain);
const { isBlocked: isAccountBlocked, isLoading: isAccountRiskLoading } = useAccountRisk();
@@ -113,13 +108,6 @@ function AppBodyWrapper() {
}
}, [activeChain, network.chain, setActiveChain]);
- useEffect(() => {
- const hasSeenWelcomeModal = getLocalStorageBoolean('hasSeenWelcomeModal');
- if (!account?.isConnecting && !account?.isConnected && !hasSeenWelcomeModal) {
- setIsWelcomeModalOpen(true);
- }
- }, [account?.isConnecting, account?.isConnected]);
-
if (isAccountRiskLoading) {
return null;
}
@@ -146,20 +134,11 @@ function AppBodyWrapper() {
>
)}
} />
- } />
+ } />
} />
- setIsWelcomeModalOpen(false)}
- onAcknowledged={() => setLocalStorageBoolean('hasSeenWelcomeModal', true)}
- onSkip={() => navigate('/markets')}
- />
{}} />
);