From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001 From: Armand Philippot 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/components/organisms/forms/contact-form.tsx | 44 +++++++++++-------------- 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'src/components/organisms/forms/contact-form.tsx') diff --git a/src/components/organisms/forms/contact-form.tsx b/src/components/organisms/forms/contact-form.tsx index b8dcb5e..ca84c25 100644 --- a/src/components/organisms/forms/contact-form.tsx +++ b/src/components/organisms/forms/contact-form.tsx @@ -1,9 +1,7 @@ import { FC, ReactNode, useState } from 'react'; import { useIntl } from 'react-intl'; -import Button from '../../atoms/buttons/button'; -import Form from '../../atoms/forms/form'; -import Spinner from '../../atoms/loaders/spinner'; -import LabelledField from '../../molecules/forms/labelled-field'; +import { Button, Form, Spinner } from '../../atoms'; +import { LabelledField } from '../../molecules'; import styles from './contact-form.module.scss'; export type ContactFormData = { @@ -33,7 +31,7 @@ export type ContactFormProps = { * * Render a contact form. */ -const ContactForm: FC = ({ +export const ContactForm: FC = ({ className = '', Notice, sendMail, @@ -94,45 +92,45 @@ const ContactForm: FC = ({ }; return ( -
+