aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/index.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-21 19:34:01 +0100
committerGitHub <noreply@github.com>2022-02-21 19:34:01 +0100
commit17842893306410f878eed66af5e807870e61cc49 (patch)
tree57608ffb9374bb3bdbbe6b3c9903e6eaefa3c180 /src/pages/index.tsx
parentf18fe8caa611e9273c5504fa81522e1ac93b95d2 (diff)
refactor: replace script tags with next/script (#10)
* refactor: replace script tags with next/script Since next.js v12.1.0 some warnings was displayed because I was using some script tags. * build(deps): bump next-themes to v0.1.1
Diffstat (limited to 'src/pages/index.tsx')
-rw-r--r--src/pages/index.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 5621d58..0045996 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -12,6 +12,7 @@ import { settings } from '@utils/config';
import { loadTranslation } from '@utils/helpers/i18n';
import { GetStaticProps, GetStaticPropsContext } from 'next';
import Head from 'next/head';
+import Script from 'next/script';
import type { ReactElement } from 'react';
import { useIntl } from 'react-intl';
import { Graph, WebPage } from 'schema-dts';
@@ -193,11 +194,12 @@ const Home: NextPageWithLayout<HomePageProps> = ({
<meta property="og:url" content={`${settings.url}`} />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={pageDescription} />
- <script
- type="application/ld+json"
- dangerouslySetInnerHTML={{ __html: JSON.stringify(schemaJsonLd) }}
- ></script>
</Head>
+ <Script
+ id="schema-homepage"
+ type="application/ld+json"
+ dangerouslySetInnerHTML={{ __html: JSON.stringify(schemaJsonLd) }}
+ />
<div id="home">
<HomePageContent components={components} />
</div>