From d6ee09d28a8cb70df125e2208e9794de173ba01e Mon Sep 17 00:00:00 2001 From: rolandpo Date: Thu, 29 Dec 2022 14:07:03 +0100 Subject: [PATCH 1/3] add meta image --- dapp/pages/_document.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dapp/pages/_document.js b/dapp/pages/_document.js index e259bb1e70..aa8203a1f1 100644 --- a/dapp/pages/_document.js +++ b/dapp/pages/_document.js @@ -39,6 +39,7 @@ class MyDocument extends Document { type="text/javascript" > + From 9af3ab2a6363bd522e6b5afe2eeda0ac88bd5e6b Mon Sep 17 00:00:00 2001 From: rolandpo Date: Fri, 20 Jan 2023 13:06:27 +0100 Subject: [PATCH 2/3] add canonical urls --- dapp/.gitignore | 2 ++ dapp/pages/_app.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/dapp/.gitignore b/dapp/.gitignore index 58cb11d45b..6d672fa63c 100644 --- a/dapp/.gitignore +++ b/dapp/.gitignore @@ -56,3 +56,5 @@ abis/* # if you use npm instead of yarn do not commit the lock file to git because it can break the Google App Engine build package-lock.json + +.env \ No newline at end of file diff --git a/dapp/pages/_app.js b/dapp/pages/_app.js index c3b0c9944b..2d6f58b403 100644 --- a/dapp/pages/_app.js +++ b/dapp/pages/_app.js @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react' import cookies from 'next-cookies' import { useWeb3React } from '@web3-react/core' import { useRouter } from 'next/router' +import Head from 'next/head' import { useCookies } from 'react-cookie' import { useStoreState } from 'pullstate' import { QueryClient, QueryClientProvider } from 'react-query' @@ -59,6 +60,8 @@ function App({ Component, pageProps, err }) { const tried = useEagerConnect() const address = useStoreState(AccountStore, (s) => s.address) + const canonicalUrl = (`https://app.ousd.com` + (router.asPath === "/" ? "": router.asPath)).split("?")[0] + if (process.browser) { useEffect(() => { router.events.on('routeChangeComplete', (url) => { @@ -165,6 +168,9 @@ function App({ Component, pageProps, err }) { return ( <> + + + From 991803987eddd4fe972a0b0475b1d2a50eb32ab7 Mon Sep 17 00:00:00 2001 From: rolandpo Date: Fri, 20 Jan 2023 13:11:24 +0100 Subject: [PATCH 3/3] prettier --- dapp/pages/_app.js | 4 +++- dapp/pages/_document.js | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dapp/pages/_app.js b/dapp/pages/_app.js index 2d6f58b403..2913eca809 100644 --- a/dapp/pages/_app.js +++ b/dapp/pages/_app.js @@ -60,7 +60,9 @@ function App({ Component, pageProps, err }) { const tried = useEagerConnect() const address = useStoreState(AccountStore, (s) => s.address) - const canonicalUrl = (`https://app.ousd.com` + (router.asPath === "/" ? "": router.asPath)).split("?")[0] + const canonicalUrl = ( + `https://app.ousd.com` + (router.asPath === '/' ? '' : router.asPath) + ).split('?')[0] if (process.browser) { useEffect(() => { diff --git a/dapp/pages/_document.js b/dapp/pages/_document.js index aa8203a1f1..abeb65225c 100644 --- a/dapp/pages/_document.js +++ b/dapp/pages/_document.js @@ -39,7 +39,12 @@ class MyDocument extends Document { type="text/javascript" > - +