aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/posts-list.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-20 16:38:54 +0200
committerArmand Philippot <git@armandphilippot.com>2023-09-20 16:38:54 +0200
commitf861e6a269ba9f62700776d3cd13b644a9e836d4 (patch)
treea5a107e7a6e4ff8b4261fe04349357bc00b783ee /src/components/organisms/layout/posts-list.tsx
parent03331c44276ec56e9f235e4d5ee75030455a753f (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/components/organisms/layout/posts-list.tsx')
-rw-r--r--src/components/organisms/layout/posts-list.tsx26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/components/organisms/layout/posts-list.tsx b/src/components/organisms/layout/posts-list.tsx
index dede7b6..e214ca7 100644
--- a/src/components/organisms/layout/posts-list.tsx
+++ b/src/components/organisms/layout/posts-list.tsx
@@ -1,17 +1,17 @@
import { FC, Fragment, useRef } from 'react';
import { useIntl } from 'react-intl';
-import useIsMounted from '../../../utils/hooks/use-is-mounted';
-import useSettings from '../../../utils/hooks/use-settings';
-import Button from '../../atoms/buttons/button';
-import Heading, { type HeadingLevel } from '../../atoms/headings/heading';
-import ProgressBar from '../../atoms/loaders/progress-bar';
-import Spinner from '../../atoms/loaders/spinner';
-import Pagination, {
- type PaginationProps,
-} from '../../molecules/nav/pagination';
-import NoResults, { NoResultsProps } from './no-results';
+import { useIsMounted, useSettings } from '../../../utils/hooks';
+import {
+ Button,
+ Heading,
+ type HeadingLevel,
+ ProgressBar,
+ Spinner,
+} from '../../atoms';
+import { Pagination, type PaginationProps } from '../../molecules';
+import { NoResults, type NoResultsProps } from './no-results';
import styles from './posts-list.module.scss';
-import Summary, { type SummaryProps } from './summary';
+import { Summary, type SummaryProps } from './summary';
export type Post = Omit<SummaryProps, 'titleLevel'> & {
/**
@@ -84,7 +84,7 @@ const sortPostsByYear = (data: Post[]): YearCollection => {
*
* Render a list of post summaries.
*/
-const PostsList: FC<PostsListProps> = ({
+export const PostsList: FC<PostsListProps> = ({
baseUrl,
byYear = false,
isLoading = false,
@@ -237,5 +237,3 @@ const PostsList: FC<PostsListProps> = ({
</>
);
};
-
-export default PostsList;