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/atoms/links/sharing-link.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/components/atoms/links/sharing-link.tsx') diff --git a/src/components/atoms/links/sharing-link.tsx b/src/components/atoms/links/sharing-link.tsx index ca53ef9..0b9d5fb 100644 --- a/src/components/atoms/links/sharing-link.tsx +++ b/src/components/atoms/links/sharing-link.tsx @@ -26,7 +26,7 @@ export type SharingLinkProps = { * * Render a sharing link. */ -const SharingLink: FC = ({ medium, url }) => { +export const SharingLink: FC = ({ medium, url }) => { const intl = useIntl(); const text = intl.formatMessage( { @@ -37,12 +37,11 @@ const SharingLink: FC = ({ medium, url }) => { { name: medium } ); const mediumClass = `link--${medium}`; + const linkClass = `${styles.link} ${styles[mediumClass]}`; return ( - + {text} ); }; - -export default SharingLink; -- cgit v1.2.3