From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 20 Sep 2023 16:38:54 +0200
Subject: 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.
---
 src/pages/contact.tsx | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

(limited to 'src/pages/contact.tsx')

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;
-- 
cgit v1.2.3

