Commit 7df53f30 authored by cartcrom's avatar cartcrom Committed by GitHub

feat: uniwallet banner (#6344)

* feat: update wallet banner display logic

* fix: linted

* fix: learn more link
parent 66497a01
......@@ -58,6 +58,5 @@ export function DownloadButton({ onClick, text = 'Download' }: { onClick?: () =>
}
export function LearnMoreButton() {
const navigate = useNavigate()
return <BaseButton onClick={() => navigate('/wallet')}>Learn More</BaseButton>
return <BaseButton onClick={() => window.open('https://wallet.uniswap.org/', '_blank')}>Learn More</BaseButton>
}
......@@ -3,8 +3,8 @@ import { useAccountDrawer } from 'components/AccountDrawer'
import { DownloadButton, LearnMoreButton } from 'components/AccountDrawer/DownloadButton'
import { AutoColumn } from 'components/Column'
import Row, { RowBetween } from 'components/Row'
import { useMgtmEnabled } from 'featureFlags/flags/mgtm'
import { X } from 'react-feather'
import { useLocation } from 'react-router-dom'
import { useHideUniswapWalletBanner } from 'state/user/hooks'
import styled, { useTheme } from 'styled-components/macro'
import { ThemedText } from 'theme'
......@@ -36,7 +36,7 @@ const PopupContainer = styled.div<{ show: boolean }>`
},
}) => `${duration.slow} opacity ${timing.in}`};
width: 100%;
bottom: 56px;
bottom: 52px;
height: 20%;
`
......@@ -67,15 +67,11 @@ const StyledXButton = styled(X)`
export default function UniswapWalletBanner() {
const [hideUniswapWalletBanner, toggleHideUniswapWalletBanner] = useHideUniswapWalletBanner()
const [walletDrawerOpen] = useAccountDrawer()
const mgtmEnabled = useMgtmEnabled()
const theme = useTheme()
const { pathname } = useLocation()
// hardcodeToFalse hardcodes the banner to never display, temporarily:
const hardcodeToFalse = false
const shouldDisplay = Boolean(
!walletDrawerOpen && !hideUniswapWalletBanner && isIOS && !pathname.startsWith('/wallet') && hardcodeToFalse
)
const shouldDisplay = Boolean(mgtmEnabled && !walletDrawerOpen && !hideUniswapWalletBanner && isIOS)
return (
<PopupContainer show={shouldDisplay}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment