aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/contact.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-29 23:38:13 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-29 23:38:13 +0100
commit82d310403c4bb09bc2f0a204b6374934a10cf348 (patch)
tree488e93e373a7d9215531bb8fcfc37bcbb290d0fa /src/pages/contact.tsx
parentf49dfba86b9ac745ddc374ee0f02f03d7e81d872 (diff)
refactor(config): move config from config dir to utils
Diffstat (limited to 'src/pages/contact.tsx')
-rw-r--r--src/pages/contact.tsx24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx
index 489135d..e410afa 100644
--- a/src/pages/contact.tsx
+++ b/src/pages/contact.tsx
@@ -4,10 +4,10 @@ import { getLayout } from '@components/Layouts/Layout';
import PostHeader from '@components/PostHeader/PostHeader';
import Sidebar from '@components/Sidebar/Sidebar';
import { SocialMedia } from '@components/Widgets';
-import { config } from '@config/website';
import { sendMail } from '@services/graphql/mutations';
import styles from '@styles/pages/Page.module.scss';
import { NextPageWithLayout } from '@ts/types/app';
+import { settings } from '@utils/config';
import { getIntlInstance, loadTranslation } from '@utils/helpers/i18n';
import { GetStaticProps, GetStaticPropsContext } from 'next';
import Head from 'next/head';
@@ -68,7 +68,7 @@ const ContactPage: NextPageWithLayout = () => {
defaultMessage: 'Contact form - {websiteName}',
description: 'ContactPage: SEO - Page title',
},
- { websiteName: config.name }
+ { websiteName: settings.name }
);
const pageDescription = intl.formatMessage(
{
@@ -76,9 +76,9 @@ const ContactPage: NextPageWithLayout = () => {
"Contact {websiteName} through its website. All you need to do it's to fill the contact form.",
description: 'ContactPage: SEO - Meta description',
},
- { websiteName: config.name }
+ { websiteName: settings.name }
);
- const pageUrl = `${config.url}${router.asPath}`;
+ const pageUrl = `${settings.url}${router.asPath}`;
const title = intl.formatMessage({
defaultMessage: 'Contact',
description: 'ContactPage: page title',
@@ -91,25 +91,25 @@ const ContactPage: NextPageWithLayout = () => {
const webpageSchema: WebPage = {
'@id': `${pageUrl}`,
'@type': 'WebPage',
- breadcrumb: { '@id': `${config.url}/#breadcrumb` },
+ breadcrumb: { '@id': `${settings.url}/#breadcrumb` },
name: pageTitle,
description: pageDescription,
- reviewedBy: { '@id': `${config.url}/#branding` },
+ reviewedBy: { '@id': `${settings.url}/#branding` },
url: `${pageUrl}`,
isPartOf: {
- '@id': `${config.url}`,
+ '@id': `${settings.url}`,
},
};
const contactSchema: ContactPageSchema = {
- '@id': `${config.url}/#contact`,
+ '@id': `${settings.url}/#contact`,
'@type': 'ContactPage',
name: title,
description: intro,
- author: { '@id': `${config.url}/#branding` },
- creator: { '@id': `${config.url}/#branding` },
- editor: { '@id': `${config.url}/#branding` },
- inLanguage: config.locales.defaultLocale,
+ author: { '@id': `${settings.url}/#branding` },
+ creator: { '@id': `${settings.url}/#branding` },
+ editor: { '@id': `${settings.url}/#branding` },
+ inLanguage: settings.locales.defaultLocale,
license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr',
mainEntityOfPage: { '@id': `${pageUrl}` },
};