feat: push nav icon to /?intro=true (#5731)

* feat: push nav icon to /?intro=true

* search
This commit is contained in:
Vignesh Mohankumar 2022-12-19 15:48:53 -05:00 committed by GitHub
parent c8086e3c76
commit 89c0caae43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,7 @@
import { Trans } from '@lingui/macro'
import { useWeb3React } from '@web3-react/core'
import Web3Status from 'components/Web3Status'
import { LandingRedirectVariant, useLandingRedirectFlag } from 'featureFlags/flags/landingRedirect'
import { chainIdToBackendName } from 'graphql/data/util'
import { useIsNftPage } from 'hooks/useIsNftPage'
import { Box } from 'nft/components/Box'
@ -80,6 +81,7 @@ export const PageTabs = () => {
const Navbar = () => {
const isNftPage = useIsNftPage()
const navigate = useNavigate()
const landingRedirectFlag = useLandingRedirectFlag()
return (
<>
@ -92,7 +94,10 @@ const Navbar = () => {
height="48"
className={styles.logo}
onClick={() => {
navigate('/')
navigate({
pathname: '/',
search: landingRedirectFlag === LandingRedirectVariant.Enabled ? '?intro=true' : undefined,
})
}}
/>
</Box>