chore: remove landing page flag (#5673)
This commit is contained in:
parent
e95e2321b4
commit
3690936aff
@ -1,5 +1,4 @@
|
||||
import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateFlag } from 'featureFlags'
|
||||
import { LandingPageVariant, useLandingPageFlag } from 'featureFlags/flags/landingPage'
|
||||
import { Permit2Variant, usePermit2Flag } from 'featureFlags/flags/permit2'
|
||||
import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc'
|
||||
import { useAtomValue, useUpdateAtom } from 'jotai/utils'
|
||||
@ -203,12 +202,6 @@ export default function FeatureFlagModal() {
|
||||
<X size={24} />
|
||||
</CloseButton>
|
||||
</Header>
|
||||
<FeatureFlagOption
|
||||
variant={LandingPageVariant}
|
||||
value={useLandingPageFlag()}
|
||||
featureFlag={FeatureFlag.landingPage}
|
||||
label="Landing page"
|
||||
/>
|
||||
<FeatureFlagOption
|
||||
variant={Permit2Variant}
|
||||
value={usePermit2Flag()}
|
||||
|
@ -1,5 +1,4 @@
|
||||
export enum FeatureFlag {
|
||||
traceJsonRpc = 'traceJsonRpc',
|
||||
landingPage = 'landingPage',
|
||||
permit2 = 'permit2',
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
import { BaseVariant } from '../index'
|
||||
|
||||
export function useLandingPageFlag(): BaseVariant {
|
||||
return BaseVariant.Enabled
|
||||
}
|
||||
|
||||
export { BaseVariant as LandingPageVariant }
|
@ -4,7 +4,6 @@ import Loader from 'components/Loader'
|
||||
import { MenuDropdown } from 'components/NavBar/MenuDropdown'
|
||||
import TopLevelModals from 'components/TopLevelModals'
|
||||
import { useFeatureFlagsIsLoaded } from 'featureFlags'
|
||||
import { LandingPageVariant, useLandingPageFlag } from 'featureFlags/flags/landingPage'
|
||||
import ApeModeQueryParamReader from 'hooks/useApeModeQueryParamReader'
|
||||
import { Box } from 'nft/components/Box'
|
||||
import { CollectionPageSkeleton } from 'nft/components/collection/CollectionPageSkeleton'
|
||||
@ -202,8 +201,6 @@ export default function App() {
|
||||
|
||||
const isHeaderTransparent = !scrolledState
|
||||
|
||||
const landingPageFlag = useLandingPageFlag()
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<DarkModeQueryParamReader />
|
||||
@ -220,7 +217,7 @@ export default function App() {
|
||||
<Suspense fallback={<Loader />}>
|
||||
{isLoaded ? (
|
||||
<Routes>
|
||||
{landingPageFlag === LandingPageVariant.Enabled && <Route path="/" element={<Landing />} />}
|
||||
<Route path="/" element={<Landing />} />
|
||||
<Route path="tokens" element={<Tokens />}>
|
||||
<Route path=":chainName" />
|
||||
</Route>
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Trace, TraceEvent } from '@uniswap/analytics'
|
||||
import { BrowserEvent, ElementName, EventName, PageName } from '@uniswap/analytics-events'
|
||||
import { BaseButton } from 'components/Button'
|
||||
import { LandingPageVariant, useLandingPageFlag } from 'featureFlags/flags/landingPage'
|
||||
import Swap from 'pages/Swap'
|
||||
import { useEffect } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
@ -170,21 +169,14 @@ export default function Landing() {
|
||||
const location = useLocation()
|
||||
const isOpen = location.pathname === '/'
|
||||
|
||||
const landingPageFlag = useLandingPageFlag()
|
||||
|
||||
useEffect(() => {
|
||||
if (landingPageFlag) {
|
||||
document.body.style.overflow = 'hidden'
|
||||
return () => {
|
||||
document.body.style.overflow = 'auto'
|
||||
}
|
||||
}
|
||||
return () => {
|
||||
// need to have a return so the hook doesn't throw.
|
||||
}
|
||||
}, [landingPageFlag])
|
||||
}, [])
|
||||
|
||||
if (landingPageFlag === LandingPageVariant.Control || !isOpen) return null
|
||||
if (!isOpen) return null
|
||||
|
||||
return (
|
||||
<Trace page={PageName.LANDING_PAGE} shouldLogImpression>
|
||||
|
Loading…
Reference in New Issue
Block a user