Skip to content

Commit

Permalink
add explore banner (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlapham authored Mar 15, 2024
1 parent 62bdb51 commit f09fc31
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions src/pages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ExternalLink, TYPE } from 'theme'
import { useActiveNetworkVersion, useSubgraphStatus } from 'state/application/hooks'
import { DarkGreyCard } from 'components/Card'
import { SUPPORTED_NETWORK_VERSIONS, EthereumNetworkInfo, OptimismNetworkInfo } from 'constants/networks'
import { Link } from 'rebass'

const AppWrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -65,7 +66,7 @@ const Hide1080 = styled.div`
}
`

const WarningWrapper = styled.div`
const BannerWrapper = styled.div`
width: 100%;
display: flex;
justify-content: center;
Expand All @@ -81,6 +82,21 @@ const WarningBanner = styled.div`
font-weight: 500;
`

const UrlBanner = styled.div`
background-color: ${({ theme }) => theme.pink1};
padding: 1rem 0.75rem;
color: white;
font-size: 14px;
width: 100%;
text-align: center;
font-weight: 500;
`

const Decorator = styled.span`
text-decoration: underline;
color: white;
`

const BLOCK_DIFFERENCE_THRESHOLD = 30

export default function App() {
Expand Down Expand Up @@ -124,13 +140,21 @@ export default function App() {
<URLWarning />
<HeaderWrapper>
{showNotSyncedWarning && (
<WarningWrapper>
<BannerWrapper>
<WarningBanner>
{`Warning:
Data has only synced to block ${subgraphStatus.syncedBlock} (out of ${subgraphStatus.headBlock}). Please check back soon.`}
</WarningBanner>
</WarningWrapper>
</BannerWrapper>
)}
<BannerWrapper>
<UrlBanner>
{`Explore the new combined V2 and V3 analytics at `}
<Link href={'https://app.uniswap.org/explore'}>
<Decorator>app.uniswap.org</Decorator>
</Link>
</UrlBanner>
</BannerWrapper>
<Hide1080>
<TopBar />
</Hide1080>
Expand Down

1 comment on commit f09fc31

@DegenDelish
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pool data on the banner link (https://app.uniswap.org/explore/pools) is inaccurate.

Example here:
Uniswap/interface#7674

Please sign in to comment.