From 82d310403c4bb09bc2f0a204b6374934a10cf348 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 29 Jan 2022 23:38:13 +0100 Subject: refactor(config): move config from config dir to utils --- src/components/Layouts/Layout.tsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/components/Layouts/Layout.tsx') diff --git a/src/components/Layouts/Layout.tsx b/src/components/Layouts/Layout.tsx index b479ef3..d074b68 100644 --- a/src/components/Layouts/Layout.tsx +++ b/src/components/Layouts/Layout.tsx @@ -2,7 +2,7 @@ import Footer from '@components/Footer/Footer'; import Header from '@components/Header/Header'; import Main from '@components/Main/Main'; import Breadcrumb from '@components/Breadcrumb/Breadcrumb'; -import { config } from '@config/website'; +import { settings } from '@utils/config'; import Head from 'next/head'; import { useRouter } from 'next/router'; import { ReactElement, ReactNode, useEffect, useRef } from 'react'; @@ -26,19 +26,19 @@ const Layout = ({ const schemaJsonLd: WithContext = { '@context': 'https://schema.org', - '@id': `${config.url}`, + '@id': `${settings.url}`, '@type': 'WebSite', - name: config.name, - description: config.baseline, - url: config.url, - author: { '@id': `${config.url}/#branding` }, - copyrightYear: Number(config.copyright.startYear), - creator: { '@id': `${config.url}/#branding` }, - editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.locales.defaultLocale, + name: settings.name, + description: settings.baseline, + url: settings.url, + author: { '@id': `${settings.url}/#branding` }, + copyrightYear: Number(settings.copyright.startYear), + creator: { '@id': `${settings.url}/#branding` }, + editor: { '@id': `${settings.url}/#branding` }, + inLanguage: settings.locales.defaultLocale, potentialAction: { '@type': 'SearchAction', - target: `${config.url}/recherche?s={query}`, + target: `${settings.url}/recherche?s={query}`, query: 'required', }, }; @@ -46,14 +46,14 @@ const Layout = ({ return ( <> - + - - + + -- cgit v1.2.3