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] 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"