Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions dapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions dapp/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -59,6 +60,10 @@ 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) => {
Expand Down Expand Up @@ -165,6 +170,9 @@ function App({ Component, pageProps, err }) {

return (
<>
<Head>
<link rel="canonical" href={canonicalUrl} />
</Head>
<QueryClientProvider client={queryClient}>
<AnalyticsProvider instance={analytics}>
<AccountListener />
Expand Down
6 changes: 6 additions & 0 deletions dapp/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class MyDocument extends Document {
type="text/javascript"
></script>

<meta
name="image"
content={
'https://cmsmediaproduction.s3.amazonaws.com/meta_9121c5630d.jpeg'
}
/>
<meta property="og:url" content="https://ousd.com" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Origin Dollar (OUSD)" />
Expand Down