From 17842893306410f878eed66af5e807870e61cc49 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 21 Feb 2022 19:34:01 +0100 Subject: 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 --- package.json | 2 +- src/components/Branding/Branding.tsx | 13 ++++++------- src/components/Breadcrumb/Breadcrumb.tsx | 13 ++++++------- src/components/Comment/Comment.tsx | 13 ++++++------- src/components/Layouts/Layout.tsx | 15 +++++---------- src/components/PostPreview/PostPreview.tsx | 13 ++++++------- src/pages/article/[slug].tsx | 10 ++++++---- src/pages/blog/index.tsx | 10 ++++++---- src/pages/contact.tsx | 10 ++++++---- src/pages/cv.tsx | 10 ++++++---- src/pages/index.tsx | 10 ++++++---- src/pages/mentions-legales.tsx | 10 ++++++---- src/pages/projet/[slug].tsx | 10 ++++++---- src/pages/projets.tsx | 10 ++++++---- src/pages/sujet/[slug].tsx | 10 ++++++---- src/pages/thematique/[slug].tsx | 10 ++++++---- yarn.lock | 8 ++++---- 17 files changed, 94 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index c3a3a66..7a5123d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "modern-normalize": "^1.1.0", "next": "^12.1.0", "next-sitemap": "^2.1.14", - "next-themes": "^0.0.15", + "next-themes": "^0.1.1", "prism-themes": "^1.9.0", "prismjs": "^1.25.0", "react": "^17.0.2", diff --git a/src/components/Branding/Branding.tsx b/src/components/Branding/Branding.tsx index 07b9259..c10fcf6 100644 --- a/src/components/Branding/Branding.tsx +++ b/src/components/Branding/Branding.tsx @@ -1,9 +1,9 @@ import photo from '@assets/images/armand-philippot.jpg'; import { settings } from '@utils/config'; -import Head from 'next/head'; import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/router'; +import Script from 'next/script'; import { ReactElement, useEffect, useRef } from 'react'; import { useIntl } from 'react-intl'; import { Person, WithContext } from 'schema-dts'; @@ -62,12 +62,11 @@ const Branding: BrandingReturn = ({ isHome = false }) => { return ( <> - - - + - + - + - + - + + + + + + + + + + +