Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new link to app.uniswap.org #456

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 @@
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 @@
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 All @@ -97,7 +111,7 @@

const BLOCK_DIFFERENCE_THRESHOLD = 30

function App() {

Check warning on line 114 in src/App.js

View workflow job for this annotation

GitHub Actions / ESLint

src/App.js#L114

Missing return type on function (@typescript-eslint/explicit-module-boundary-types)
const [savedOpen, setSavedOpen] = useState(false)

const globalData = useGlobalData()
Expand All @@ -110,12 +124,20 @@
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
Loading