From e8f4ba8e059f2431422b2fd7fa0e2406b43be8ea Mon Sep 17 00:00:00 2001 From: eddie <66155195+just-toby@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:10:26 -0700 Subject: [PATCH 1/3] feat: add canonical tags --- .nvmrc | 2 +- package.json | 5 ++++- src/App.js | 2 ++ src/components/Meta.tsx | 15 +++++++++++++++ yarn.lock | 20 ++++++++++++++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/components/Meta.tsx diff --git a/.nvmrc b/.nvmrc index ca3f1e5c8..5edcff036 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14 \ No newline at end of file +v16 \ No newline at end of file diff --git a/package.json b/package.json index 4bb4d2887..4dfe55227 100644 --- a/package.json +++ b/package.json @@ -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" + } } diff --git a/src/App.js b/src/App.js index 94b0a1f46..625957376 100644 --- a/src/App.js +++ b/src/App.js @@ -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' @@ -83,6 +84,7 @@ const LayoutWrapper = ({ children, savedOpen, setSavedOpen }) => { return ( <> +
{children}
diff --git a/src/components/Meta.tsx b/src/components/Meta.tsx new file mode 100644 index 000000000..65b852857 --- /dev/null +++ b/src/components/Meta.tsx @@ -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 ( + + + + ) +} + +export default withRouter(Meta) diff --git a/yarn.lock b/yarn.lock index 8c53e6533..e770617c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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" @@ -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" From f4620c1ed4a21a0c2c9a147720240619e19ea41d Mon Sep 17 00:00:00 2001 From: eddie <66155195+just-toby@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:55:26 -0700 Subject: [PATCH 2/3] fix: update node? --- .github/workflows/lint.yml | 2 +- package.json | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 50c4ee26b..3efc73899 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/package.json b/package.json index 4dfe55227..853067080 100644 --- a/package.json +++ b/package.json @@ -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", @@ -92,4 +92,4 @@ "dependencies": { "react-helmet": "^6.1.0" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e770617c9..aeaa6eecc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" From c31bd1b77b7d9148af15e55eed17d948144fc463 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Wed, 30 Aug 2023 18:56:20 +0000 Subject: [PATCH 3/3] Fix code style issues with ESLint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 853067080..ae4179eaa 100644 --- a/package.json +++ b/package.json @@ -92,4 +92,4 @@ "dependencies": { "react-helmet": "^6.1.0" } -} \ No newline at end of file +}