Skip to content

Commit

Permalink
add new explore banner
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlapham committed Mar 13, 2024
1 parent 7a3e2d6 commit 0405346
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Route, Switch, BrowserRouter, Redirect } from 'react-router-dom'
import GlobalPage from './pages/GlobalPage'
import TokenPage from './pages/TokenPage'
import PairPage from './pages/PairPage'
import Link from './components/Link'
import { useGlobalData, useGlobalChartData } from './contexts/GlobalData'
import { isAddress } from './utils'
import AccountPage from './pages/AccountPage'
Expand Down Expand Up @@ -62,7 +63,7 @@ const Center = styled.div`
background-color: ${({ theme }) => theme.onlyLight};
`

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

const UrlBanner = styled.div`
background-color: #ff007a;
padding: 1rem;
color: white;
width: 100%;
text-align: center;
font-weight: 500;
`

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

/**
* Wrap the component with the header and sidebar pinned tab
*/
Expand Down Expand Up @@ -110,12 +124,20 @@ function App() {
return (
<ApolloProvider client={client}>
<AppWrapper>
<BannerWrapper>
<UrlBanner>
{`Explore the new combinved V2 and V2 analytics at `}
<Link color="white" external href={'https://app.uniswap.org/explore'}>
<Decorator>app.uniswap.org</Decorator>
</Link>{' '}
</UrlBanner>
</BannerWrapper>
{showWarning && (
<WarningWrapper>
<BannerWrapper>
<WarningBanner>
{`Warning: The data on this site has only synced to Ethereum block ${latestBlock} (out of ${headBlock}). Please check back soon.`}
</WarningBanner>
</WarningWrapper>
</BannerWrapper>
)}
{globalData &&
Object.keys(globalData).length > 0 &&
Expand Down

0 comments on commit 0405346

Please sign in to comment.