diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-20 16:38:54 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-20 16:38:54 +0200 |
| commit | f861e6a269ba9f62700776d3cd13b644a9e836d4 (patch) | |
| tree | a5a107e7a6e4ff8b4261fe04349357bc00b783ee /src/pages/contact.tsx | |
| parent | 03331c44276ec56e9f235e4d5ee75030455a753f (diff) | |
refactor: use named export for everything except pages
Next expect a default export for pages so only those components should
use default exports. Everything else should use named exports to
reduce the number of import statements.
Diffstat (limited to 'src/pages/contact.tsx')
| -rw-r--r-- | src/pages/contact.tsx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index b35b8e0..e3c8a2c 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -4,25 +4,26 @@ import { useRouter } from 'next/router'; import Script from 'next/script'; import { useState } from 'react'; import { useIntl } from 'react-intl'; -import Notice, { type NoticeKind } from '../components/atoms/layout/notice'; -import ContactForm, { +import { + ContactForm, type ContactFormProps, -} from '../components/organisms/forms/contact-form'; -import SocialMedia from '../components/organisms/widgets/social-media'; -import { getLayout } from '../components/templates/layout/layout'; -import PageLayout from '../components/templates/page/page-layout'; + getLayout, + Notice, + type NoticeKind, + PageLayout, + SocialMedia, +} from '../components'; import { meta } from '../content/pages/contact.mdx'; -import { sendMail } from '../services/graphql/contact'; +import { sendMail } from '../services/graphql'; import styles from '../styles/pages/contact.module.scss'; -import { type NextPageWithLayout } from '../types/app'; -import { loadTranslation } from '../utils/helpers/i18n'; +import { type NextPageWithLayout } from '../types'; import { getSchemaJson, getSinglePageSchema, getWebPageSchema, -} from '../utils/helpers/schema-org'; -import useBreadcrumb from '../utils/hooks/use-breadcrumb'; -import useSettings from '../utils/hooks/use-settings'; +} from '../utils/helpers'; +import { loadTranslation } from '../utils/helpers/server'; +import { useBreadcrumb, useSettings } from '../utils/hooks'; const ContactPage: NextPageWithLayout = () => { const { dates, intro, seo, title } = meta; |
