aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/404.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/pages/404.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/pages/404.tsx')
-rw-r--r--src/pages/404.tsx31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index a6d84f5..5dff404 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -2,28 +2,27 @@ import { GetStaticProps } from 'next';
import Head from 'next/head';
import { ReactNode } from 'react';
import { useIntl } from 'react-intl';
-import Link from '../components/atoms/links/link';
-import SearchForm from '../components/organisms/forms/search-form';
-import LinksListWidget from '../components/organisms/widgets/links-list-widget';
-import { getLayout } from '../components/templates/layout/layout';
-import PageLayout from '../components/templates/page/page-layout';
+import {
+ getLayout,
+ Link,
+ LinksListWidget,
+ PageLayout,
+ SearchForm,
+} from '../components';
import {
getThematicsPreview,
+ getTopicsPreview,
getTotalThematics,
-} from '../services/graphql/thematics';
-import { getTopicsPreview, getTotalTopics } from '../services/graphql/topics';
-import { type NextPageWithLayout } from '../types/app';
+ getTotalTopics,
+} from '../services/graphql';
import {
+ type NextPageWithLayout,
type RawThematicPreview,
type RawTopicPreview,
-} from '../types/raw-data';
-import { loadTranslation, type Messages } from '../utils/helpers/i18n';
-import {
- getLinksListItems,
- getPageLinkFromRawData,
-} from '../utils/helpers/pages';
-import useBreadcrumb from '../utils/hooks/use-breadcrumb';
-import useSettings from '../utils/hooks/use-settings';
+} from '../types';
+import { getLinksListItems, getPageLinkFromRawData } from '../utils/helpers';
+import { loadTranslation, type Messages } from '../utils/helpers/server';
+import { useBreadcrumb, useSettings } from '../utils/hooks';
type Error404PageProps = {
thematicsList: RawThematicPreview[];