Skip to content

Commit

Permalink
feat: add canonical tags (#451)
Browse files Browse the repository at this point in the history
* feat: add canonical tags

* fix: update node?

* Fix code style issues with ESLint

---------

Co-authored-by: Lint Action <[email protected]>
  • Loading branch information
just-toby and lint-action authored Sep 1, 2023
1 parent 42b224a commit 7a3e2d6
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
always-auth: true
registry-url: https://registry.npmjs.org

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v16
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@reach/portal": "^0.10.3",
"@reach/router": "^1.2.1",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.13",
"@types/node": "^16.x",
"@types/react": "^16.9.36",
"@types/react-dom": "^16.9.8",
"@types/styled-components": "^5.1.0",
Expand Down Expand Up @@ -88,5 +88,8 @@
"last 1 safari version"
]
},
"license": "GPL-3.0-or-later"
"license": "GPL-3.0-or-later",
"dependencies": {
"react-helmet": "^6.1.0"
}
}
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import PinnedData from './components/PinnedData'

import SideNav from './components/SideNav'
import AccountLookup from './pages/AccountLookup'
import Meta from './components/Meta'
import LocalLoader from './components/LocalLoader'
import { useLatestBlocks } from './contexts/Application'
import GoogleAnalyticsReporter from './components/analytics/GoogleAnalyticsReporter'
Expand Down Expand Up @@ -83,6 +84,7 @@ const LayoutWrapper = ({ children, savedOpen, setSavedOpen }) => {
return (
<>
<ContentWrapper open={savedOpen}>
<Meta />
<SideNav />
<Center id="center">{children}</Center>
<Right open={savedOpen}>
Expand Down
15 changes: 15 additions & 0 deletions src/components/Meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Helmet } from 'react-helmet'
import { withRouter, RouteComponentProps } from 'react-router-dom'
import React from 'react'

const WEBSITE_HOST_URL = 'https://v2.info.uniswap.org'

const Meta = ({ location }: RouteComponentProps): JSX.Element => {
return (
<Helmet>
<link rel="canonical" href={`${WEBSITE_HOST_URL}${location.pathname}`} />
</Helmet>
)
}

export default withRouter(Meta)
28 changes: 24 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2013,10 +2013,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b"
integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==

"@types/node@^14.0.13":
version "14.17.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.6.tgz#cc61c8361c89e70c468cda464d1fa3dd7e5ebd62"
integrity sha512-iBxsxU7eswQDGhlr3AiamBxOssaYxbM+NKXVil8jg9yFXvrfEFbDumLD/2dMTB+zYyg7w+Xjt8yuxfdbUHAtcQ==
"@types/node@^16.x":
version "16.18.46"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.46.tgz#9f2102d0ba74a318fcbe170cbff5463f119eab59"
integrity sha512-Mnq3O9Xz52exs3mlxMcQuA7/9VFe/dXcrgAyfjLkABIqxXKOgBRjyazTxUbjsxDa4BP7hhPliyjVTP9RDP14xg==

"@types/parse-json@^4.0.0":
version "4.0.0"
Expand Down Expand Up @@ -10109,6 +10109,11 @@ react-fast-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==

react-fast-compare@^3.1.1:
version "3.2.2"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49"
integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==

react-feather@^2.0.3:
version "2.0.9"
resolved "https://registry.yarnpkg.com/react-feather/-/react-feather-2.0.9.tgz#6e42072130d2fa9a09d4476b0e61b0ed17814480"
Expand All @@ -10121,6 +10126,16 @@ react-ga@^3.1.2:
resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-3.3.0.tgz#c91f407198adcb3b49e2bc5c12b3fe460039b3ca"
integrity sha512-o8RScHj6Lb8cwy3GMrVH6NJvL+y0zpJvKtc0+wmH7Bt23rszJmnqEQxRbyrqUzk9DTJIHoP42bfO5rswC9SWBQ==

react-helmet@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726"
integrity sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==
dependencies:
object-assign "^4.1.1"
prop-types "^15.7.2"
react-fast-compare "^3.1.1"
react-side-effect "^2.1.0"

react-iframe@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/react-iframe/-/react-iframe-1.8.0.tgz#8c78f2c59b894ca5605fa7e45e61e27e57e96091"
Expand Down Expand Up @@ -10296,6 +10311,11 @@ react-select@^3.0.7:
react-input-autosize "^3.0.0"
react-transition-group "^4.3.0"

react-side-effect@^2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.2.tgz#dc6345b9e8f9906dc2eeb68700b615e0b4fe752a"
integrity sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==

react-smooth-fork@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/react-smooth-fork/-/react-smooth-fork-1.0.3.tgz#f29179a071ca3180fd21ba662c6ad939f98987cd"
Expand Down

1 comment on commit 7a3e2d6

@vercel
Copy link

@vercel vercel bot commented on 7a3e2d6 Sep 1, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

v2-info – ./

v2.info.uniswap.org
v2-info-uniswap.vercel.app
v2-info-git-v2-uniswap.vercel.app

Please sign in to comment.