fix(frontend): fix duplicate meta elements

This commit is contained in:
Sam 2022-11-20 23:36:04 +01:00
parent 83c1fa6e42
commit 03a0ffc1ca

View file

@ -6,6 +6,9 @@ import { RecoilRoot } from "recoil";
import Head from "next/head"; import Head from "next/head";
function MyApp({ Component, pageProps }: AppProps) { function MyApp({ Component, pageProps }: AppProps) {
const domain =
typeof window !== "undefined" ? window.location.origin : process.env.DOMAIN;
return ( return (
<RecoilRoot> <RecoilRoot>
<Head> <Head>
@ -13,14 +16,14 @@ function MyApp({ Component, pageProps }: AppProps) {
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta name="theme-color" content="#aa8ed6" /> <meta name="theme-color" content="#aa8ed6" />
<meta key="sitename" property="og:site_name" content="pronouns.cc" /> <meta key="og:sitename" property="og:site_name" content="pronouns.cc" />
<meta key="title" property="og:title" content="pronouns.cc" /> <meta key="og:title" property="og:title" content="pronouns.cc" />
<meta <meta
key="description" key="og:description"
property="og:description" property="og:description"
content="Name and pronoun cards!" content="Name and pronoun cards!"
/> />
<meta key="url" property="og:url" content={process.env.DOMAIN} /> <meta key="og:url" property="og:url" content={domain} />
</Head> </Head>
<Navigation /> <Navigation />
<Container> <Container>